1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-02-14 18:30:39 +01:00

1255 Commits

Author SHA1 Message Date
Rosen Penev
d284d42e71 fix compilation with mips16
Some users wrongly pass both -mips16 and -mdsp when compiling on MIPS
platforms. Handle such a case.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-01-14 14:56:46 +02:00
Martin Storsjo
2e64f76d2e Don't use an enum for a value read directly from the bitstream
The enum doesn't cover all possible values read from the bitstream.

This fixes undefined behaviour sanitizer errors.

Fixes: 27624/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-6049277318791168

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-11-30 12:55:07 +02:00
Martin Storsjo
a0411159e8 Revert "Avoid a failed assert on invalid channel indices"
This reverts commit 9b0f848911068943bbadeb37c0b8857605e74093.

This local fix doesn't seem to be needed any more after the latest
upstream update.
2020-11-17 12:58:59 +02:00
Martin Storsjo
2b3e9ddc81 Revert "Don't use an enum for a value read directly from the bitstream"
This reverts commit 28fcbe9faed794a9d74aef529beb83386da1f4aa.

This local fix doesn't seem to be needed any more after the latest
upstream update.
2020-11-17 12:58:30 +02:00
Martin Storsjo
d9a9f3b793 Revert "Don't use an enum for a value read directly from the bitstream"
This reverts commit e7d8591ff208803eee35dc289e89a0d69b707585.

This local fix doesn't seem to be needed any more after the latest
upstream update.
2020-11-17 12:58:00 +02:00
Martin Storsjo
60a11ea3ef Revert "Don't use an enum for a value read directly from the bitstream"
This reverts commit 8439b745f65bce3fd55ffc9f9edcc04f5f447c55.

This local fix doesn't seem to be needed any more after the latest
upstream update.
2020-11-17 12:57:21 +02:00
Martin Storsjo
ea21799a7b Revert "Avoid undefined shifts in SATURATE_SHIFT"
This reverts commit 3a831a5fbc990c83e9b5b804a082bb158364e793.

This local fix doesn't seem to be needed any more after the latest
upstream update.
2020-11-17 12:56:58 +02:00
Martin Storsjo
559379e08b Update the version numbers in the public installed headers 2020-11-17 12:41:48 +02:00
Martin Storsjo
dc29bf5457 Remove references to sbr_crc.cpp that was removed upstream 2020-11-17 12:40:36 +02:00
Martin Storsjo
c7a3808a2f Merge remote-tracking branch 'aosp/master' 2020-11-17 12:38:51 +02:00
Martin Storsjo
d23a21ab42 Avoid undefined shifts in calculateSbrEnvelope
Fixes: 26845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5670674796118016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-11-17 12:26:19 +02:00
Martin Storsjo
4e944af756 Avoid undefined shifts in SBR calcCRC
Fixes: 25404/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5397024709804032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-11-17 12:26:19 +02:00
Bill Yi
f4adff7fbb Merge "Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE" 2020-11-05 01:06:54 +00:00
Bill Yi
5b4265a02a Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE
Merged-In: I44e842648acbceb02bbc28cf2ad729a0caddf60d
Change-Id: Iead5cf2ca1c993da0844a11d1e64bf3cc86ed5dd
2020-11-04 13:57:54 -08:00
Xin Li
f473247482 Skip ab/6749736 in stage.
Merged-In: Icfe1613791fb53502d99e3030dd9e9baa3fa5c33
Change-Id: I7d1c753bfa3343d5931058143dc016c3a0861700
2020-10-08 16:52:22 -07:00
android-build-team Robot
0e9a1509b5 Merge cherrypicks of [12620612, 12620613, 12620936, 12620457, 12616684, 12621005, 12620883, 12620884, 12620846, 12620847, 12620869, 12620848, 12620849, 12620961, 12620962, 12620827, 12620614, 12620197, 12620885, 12620198, 12621039, 12621040, 12621041, 12620937, 12620615, 12620886] into rvc-release
Change-Id: If3dab82f5ef50b669aa488a49aebe27bb6070079
2020-09-16 23:30:07 +00:00
Fraunhofer IIS FDK
ffff95538e Fix heap buffer overflow in sbrDecoder_AssignQmfChannels2SbrChannels().
In the bug the SBR decoder has already set up 9 channels and tries to
allocate one more channel. The assignment of the QMF channels to SBR
channels fails since the QMF domain manages only 8+1 channels instead
of 10 channels as reqeusted by SBR.
Here we have added a check in sbrDecoder_InitElement() which will
return with a parse error in case additional SBR channels would exceed
the maximum number of SBR channels. This solves the potential heap
buffer overflow.

Bug: 158762825
Test: atest DecoderTestAacDrc DecoderTestAacFormat DecoderTestXheAac
Change-Id: I0150ac6d5a47ffce883010f531928656eebc619e
Merged-In: I0150ac6d5a47ffce883010f531928656eebc619e
(cherry picked from commit bb8f983bf36ee2ad8af6acebf4823a58060004ab)
2020-09-16 23:28:22 +00:00
Xin Li
26a0396347 [automerger skipped] Merge "Merge Android R" am: 89b6626d5d -s ours
am skip reason: Change-Id Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77 with SHA-1 7a0dde5d5d is in history

Original change: https://android-review.googlesource.com/c/platform/external/aac/+/1421866

Change-Id: I6d537ca8862ea4f0409b2f173ab9d7e9cafc70ae
2020-09-11 00:40:34 +00:00
Xin Li
89b6626d5d Merge "Merge Android R" 2020-09-10 17:22:12 +00:00
Xin Li
7f7e67fe02 Merge Android R
Bug: 168057903
Merged-In: Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77
Change-Id: I29b7ae1003fb72aeb5fbf1fdfdceea849c1c12b8
2020-09-08 16:53:57 -07:00
Martin Storsjo
3a831a5fbc Avoid undefined shifts in SATURATE_SHIFT
Make sure that the shift amount is less than the size of the shifted
value, otherwise return the saturation max values (for left shift, if
the source values was nonzero) or zero (for right shift, or zero
shifted left).

Fixes: 24376/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-6529411206348800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-09-02 12:56:41 +03:00
Xin Li
7a0dde5d5d Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I9bd31724ae68b9a0b3eb4bb5be3782359824aa1f
Change-Id: Idcdb13a8c37b0b4b5446169c3e80dfe55586bc77
2020-08-27 10:16:06 -07:00
Martin Storsjo
8439b745f6 Don't use an enum for a value read directly from the bitstream
The enum doesn't cover all possible values read from the bitstream.

This fixes undefined behaviour sanitizer errors.

Fixes: 23719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5111020367642624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-07-17 22:51:34 +03:00
Jean-Michel Trivi
73da86e336 Merge "Improve code coverage for aac_dec_fuzzer" am: 760e8921c2 am: 946a672b0f am: e0624f4c05
Original change: https://android-review.googlesource.com/c/platform/external/aac/+/1324135

Change-Id: Icfe1613791fb53502d99e3030dd9e9baa3fa5c33
2020-07-10 18:12:12 +00:00
Jean-Michel Trivi
e0624f4c05 Merge "Improve code coverage for aac_dec_fuzzer" am: 760e8921c2 am: 946a672b0f
Original change: https://android-review.googlesource.com/c/platform/external/aac/+/1324135

Change-Id: I9bd31724ae68b9a0b3eb4bb5be3782359824aa1f
2020-07-10 17:56:32 +00:00
Jean-Michel Trivi
946a672b0f Merge "Improve code coverage for aac_dec_fuzzer" am: 760e8921c2
Original change: https://android-review.googlesource.com/c/platform/external/aac/+/1324135

Change-Id: I49925ff2d6e55f0def55bf012f7ff3f33cacea4e
2020-07-10 17:45:08 +00:00
Jean-Michel Trivi
760e8921c2 Merge "Improve code coverage for aac_dec_fuzzer" 2020-07-10 17:33:20 +00:00
Martin Storsjo
ec58a940e2 Avoid undefined shifts
Fixes: 23522/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5468272958111744

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-06-22 13:28:10 +03:00
S Vasudev Prasad
c1a75279a1 Improve code coverage for aac_dec_fuzzer
Test: ./aac_dec_fuzzer
Bug: 158206619

Change-Id: I42d57ec832dbd273f66ce149ce81bfcb1c514add
2020-06-19 10:57:18 +05:30
Martin Storsjo
845febbb4a Don't store a value read directly from the bitstream in an enum
In this case, the enum only has one single allowed value, while the
bitstream can contain a number of different values.

Don't load the unchecked value into an enum variable, because
storing the disallowed values in the enum variable is undefined
behaviour. Instead store it in an int, until the value has been
verified to be the allowed one.

This fixes undefined behaviour sanitizer errors.

Fixes: 23192/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5205702892322816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-06-12 10:29:11 +03:00
Martin Storsjo
5aa57d3633 Don't use an enum for a value read directly from the bitstream
The enum doesn't cover all possible values read from the bitstream.

This fixes undefined behaviour sanitizer errors.

Fixes: 22486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5735284884111360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
2020-06-04 09:50:16 +03:00
android-build-team Robot
63d6409af1 Snap for 6544675 from ebc1030f65bb1e1e7dccf99e56a5d0221f097fdb to rvc-release
Change-Id: Icd0e65b905da537b43498b94b7e4d0424837c9d1
2020-05-30 23:08:39 +00:00
Ray Essick
c2d9dc1ab3 point to new repo hooks for mainline uploads am: ebc1030f65 am: 251785c993
Change-Id: I61510ab3a0a69acb70875ea8e3163fa7debcb18c
2020-05-30 00:03:25 +00:00
Ray Essick
eeb1d2d3cf point to new repo hooks for mainline uploads am: ebc1030f65 am: ecae3c24b3
Change-Id: I4af7365b2f0e59ecd52df4022faf4f7798932d7a
2020-05-30 00:03:07 +00:00
Ray Essick
251785c993 point to new repo hooks for mainline uploads am: ebc1030f65
Change-Id: Ibaae6c3cebad3d20b19447824bc5433601081968
2020-05-29 23:49:26 +00:00
Ray Essick
ecae3c24b3 point to new repo hooks for mainline uploads am: ebc1030f65
Change-Id: I2f08b01ee76f7524fb041d8541847eb9b4832f14
2020-05-29 23:49:24 +00:00
Ray Essick
ebc1030f65 point to new repo hooks for mainline uploads
Bug: 157501573
Test: upload
Change-Id: I0e4764db6516d17a81dc5a31bf9d9427b2c570d6
2020-05-26 16:29:58 -07:00
Treehugger Robot
6313f8703e Merge "Fix license type s/b BY_EXCEPTION_ONLY" am: 86bd192796 am: e76ca4d9ac am: 6d5490018a
Change-Id: I7b5c175a03532581aac39584dcd308eca401642a
2020-05-21 22:55:18 +00:00
Treehugger Robot
6d5490018a Merge "Fix license type s/b BY_EXCEPTION_ONLY" am: 86bd192796 am: e76ca4d9ac
Change-Id: Ia1d49e25596031c732021bccb2a86a03f3ad874c
2020-05-21 22:41:14 +00:00
Treehugger Robot
e76ca4d9ac Merge "Fix license type s/b BY_EXCEPTION_ONLY" am: 86bd192796
Change-Id: If0646e3c2b9b9927a58811606fff28e432e6d303
2020-05-21 22:28:36 +00:00
Treehugger Robot
86bd192796 Merge "Fix license type s/b BY_EXCEPTION_ONLY" 2020-05-21 22:16:18 +00:00
Kris Alder
194e249990 Merge "Added fuzz_config field in aac_dec_fuzzer" am: 43fb529e06 am: f96c6f3a30 am: f60530f491
Change-Id: I20727c08423682ca8c6d3fcfa680423375c02156
2020-05-21 20:35:45 +00:00
Kris Alder
f60530f491 Merge "Added fuzz_config field in aac_dec_fuzzer" am: 43fb529e06 am: f96c6f3a30
Change-Id: I4104bd7b4964dbd270cb614a164d426ecd24e0bf
2020-05-21 20:10:40 +00:00
Kris Alder
f96c6f3a30 Merge "Added fuzz_config field in aac_dec_fuzzer" am: 43fb529e06
Change-Id: I9cc973e862cfa58047cd1056488f64de4bf07abb
2020-05-21 19:54:30 +00:00
Bob Badour
92c9b7ea9a Fix license type s/b BY_EXCEPTION_ONLY
The Fraunhofer license has special requirements.

Test: no code change
Change-Id: I439354498c0a28d6ff078cea9a4f8e9bfc02145f
2020-05-21 12:49:18 -07:00
Kris Alder
43fb529e06 Merge "Added fuzz_config field in aac_dec_fuzzer" 2020-05-21 19:37:30 +00:00
Ayushi Khopkar
64e4f25b29 Added fuzz_config field in aac_dec_fuzzer
Test: ./aac_dec_fuzzer
Bug: 156871294

Change-Id: Idfc93a6f6c71a78c2b7759443161d8e75dfc4670
2020-05-19 11:59:34 +05:30
android-build-team Robot
d0f1ac8a7b Snap for 6484097 from 71c477bae4e0b1bfad90fd4e4dbba496aa6d9c68 to rvc-release
Change-Id: I4db69c7d577a0fde24cf10c01302118be83a29cd
2020-05-12 01:13:03 +00:00
Jooyung Han
d6b557a3b2 [automerger skipped] Set min_sdk_version to be part of mainline modules am: 71c477bae4 -s ours am: d4b4152be0 -s ours
am skip reason: Change-Id I662ad951a3221f967b53e7af65cb203a4b4a5e5d with SHA-1 71c477bae4 is in history

Change-Id: Ib0f01bde91a3b106189590c9fb4eda78ebbd3bcb
2020-05-11 08:41:19 +00:00
Jooyung Han
fcd9348524 [automerger skipped] Set min_sdk_version to be part of mainline modules am: 71c477bae4 am: b6b6120ac8 -s ours
am skip reason: Change-Id I662ad951a3221f967b53e7af65cb203a4b4a5e5d with SHA-1 d40f05a618 is in history

Change-Id: Id12352863d662df8517a57f6334bb2268c79b1e1
2020-05-11 08:41:06 +00:00