Modified version of libxaac based on https://github.com/ittiam-systems/libxaac, starting from commit 1f798f1cc5b784fcc5af8777e0c7c2e7da5620db
Find a file
Sushanth Patil ed03681d52 Fix for heap buffer overflow in read_bits_buf
In ixheaacd_arith_decode(), ixheaacd_read_bidireciton()
was being called even when bitbuffer was exhausted which
in turn made cnt_bits and bit_pos more and more negative
which overflowed eventually and resulted in heap buffer
overlow. We also observed the variable "cumulative"
value to be zero even after reaching the end of bitbuffer
and this in turn lead to an infinte for loop
"for (lev = esc_nb = 0;;)" in ixheaacd_arth_decoding_level2()
as "cumulative" value would not be updated after reaching
end of bitbuffer.
As a fix , we return whenever "cumulative" value remains
zero even after bitbuffer is exhausted.

And this patch adds a check for (cnt_bits < 0) in
ixheaacd_bitbuffer.c and removes bitbuffer wrap around
in ixheaacd_read_bidirection().

Added cnt_bits > 25 check in ixheaacd_read_bits_buf() &
ixheaacd_show_bits_buf() as these functions cannot handle
read of more than 25 bits at a time.

Bug:123976878
Test: poc
Change-Id: I4ec729fddb859ddd0add0045532e20fbfffd2e5c
2019-05-02 12:02:08 -07:00
decoder Fix for heap buffer overflow in read_bits_buf 2019-05-02 12:02:08 -07:00
test Merge "Fix for out of bound write in xaacdec test bench" 2019-04-03 22:51:57 +00:00
Android.bp Added CFI blacklist to handle indirect calls to assembly functions 2019-01-18 16:35:54 -08:00
libxaac_blacklist.txt Update cfi blacklist to include few more assembly functions 2019-03-27 15:49:29 -07:00
LICENSE Bring xHE-AAC into pi-dev branch 2018-05-17 14:36:48 -07:00
MODULE_LICENSE_APACHE2 Bring xHE-AAC into pi-dev branch 2018-05-17 14:36:48 -07:00
NOTICE Bring xHE-AAC into pi-dev branch 2018-05-17 14:36:48 -07:00
OWNERS Bring xHE-AAC into pi-dev branch 2018-05-17 14:36:48 -07:00
README.experimental Mark xaac codec experimental 2018-10-16 19:05:33 +00:00

This xaac codec (external/xaac) is experimental; it is not yet intended
to be used on production devices.

This codec should not be configured into any production Android Pie
(Android 9) device that will be shipped.