Added missing return checks and converted
functions to void which doesn't return anything
other than zero.
Test: Review
Test: atest android.media.cts.DecoderTest
Bug:131183694
Change-Id: Iea7bb9959fffd7a0e4f345f86581a1328e04a38e
When ixheaacd_drc_offset comes negative, we read
backward in bitbuffer. There was no bound check to
make sure it did not go beyond the start of bitbuffer.
This caused a SEGV.
As a fix, bound check has been added.
Bug:144134845
Test: poc in bug
Change-Id: I94c4362f26fdb463eb07f5006d0f36860aad8128
This CL contains changes to make #include delimiters stying
consistent. For all system files inclusion we will use <> and
all user files we will use ""
Bug: 125443111
Test: compilation
Change-Id: Ie5f609b9bef8357877affb7f48d46df7c387d142
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
In this erroneous case, initial few frames don't have sbr
and later sbr is present, causing invalid memory access.
As a fix, removed the condition over sbr initialization,
allowing it to initialize sbr independent of sbr being
present or not.
Bug:118685461
Bug:120124033
Test: poc
Change-Id: I54810fb8cb20ebeeff6341efbe32f99860aa0a5c
This error stream contains two elements (CPE and CCE). Because
the stream is an erroneous for CCE at the time of initialization
number of channel is 1 and at the time of execution it is 2.
So code is modified to populate memory based on MAXIMUM CHANNELS
allowed for SBR
Bug:112711350
Test: poc
Change-Id: Ia4b75694ae29d025289d0f85123ce2b24f9c1022
Test: CTS android.media.cts.DecoderTest{AacDrc,XheAac}
Added __ARM_NEON__ check to generic function selector
Bug: 80432407
Change-Id: I66c7879fda1369da88ccaea5f8792ea54657cdaf
Added support to build for mips
Bug: 80432286
Change-Id: I908029bbaddd3c1fbc39be1192926b56d981576e
Add optimized versions for qmf_dec for armv7 and armv8
Separating common functions and platform specific functions
in ixheaacd_qmf_dec.c. Platform specific functions are moved
to qmf_dec in armv7, armv8 and generic folder.
Bug: 80431870
Change-Id: I860cb79a1870e228d2108b7915418e1c003cefc5
Fixes for crashes reported by Fuzzer tool
Bug: 109697676
Change-Id: I862fc054b99ee9d427d20596bc8d2e85522a7188