Commit graph

15 commits

Author SHA1 Message Date
TreeHugger Robot
00e3408f15 Merge "Fix for segmentation fault in ixheaacd_dec_execute" 2018-12-29 00:03:41 +00:00
TreeHugger Robot
c27192a5bb Merge "Fix for use of uninitialized variable in ixheaacd_read_block_data." 2018-12-28 23:11:47 +00:00
Rajat Kumar
ee90aac01b Fix for Heap buffer overflow in main process function
Initialized num_ch to zero and moved num_ch update outside
if (skip_full_decode == 0) condition to avoid propagation
of uninitialized or wrong num_ch for all cases.

Bug:120590841
Test: vendor, poc
Change-Id: I8aca82be8a20689547a2b85f8f3a06700b9927d2
2018-12-28 09:44:41 -08:00
Ramesh Katuri
b17f1b007f Fix for segmentation fault in ixheaacd_dec_execute
ixheaacd_aac_decoder_init() is called inside ixheaacd_dec_execute().
ixheaacd_aac_decoder_init() will return NULL pointer in failure case and
pointer to aac decoder structure in successful case.

After this function NULL pointer check before de-referencing is missing
which is causing segmentation fault.

As a fix NULL pointer check is added

Bug:118615735
Test: vendor
Change-Id: I0e9a22e0f97dc99c238a026bf0fd693c3e93e4e7
2018-12-22 05:58:47 -08:00
Tripti Tiwari
34f516c4c8 Fix for use of uninitialized variable in ixheaacd_read_block_data.
Valgrind has reported use of uninitialized variable in
ixheaacd_read_block_data, which is caused due to uninitialized
api object.

As fix, initialized the api object.

Bug:118615735.
Test: vendor
Change-Id: Ib2702eac2c2f659589ce7616a9818913879ff3de
2018-12-22 05:57:18 -08:00
Ramesh Katuri
8a7b96d6fd Fix to handle multiple CSD's in a stream
header_dec_done flag was set to 1 after decoding the first CSD.
When multiple CSDs are present in a stream this flag should
be reset to 0, after the first CSD is decoded to decode the
next CSD successfully. We have added this fix at two places,
first one is for USAC streams and other is for the rest.

Bug: 113624510
Test: poc
Change-Id: I000807341b8b1e42d42c88685fd9775c98a29fc6
2018-10-04 16:19:55 -07:00
Ramesh Katuri
c870c1c056 Fix for un-initialized adts header structure in api
adts header has been initialized to zero

Bug:113035224
Test: poc
Change-Id: I2885a16c8919fd9ce95982899eab90c1896db653
2018-09-18 17:14:32 -07:00
TreeHugger Robot
7bcd685928 Merge "Fix for stack buffer underflow in sbr" 2018-09-12 19:23:35 +00:00
Ramesh Katuri
79bcb536d6 Merge "Fix for NPD in case of single coupling channel element." into pi-dev am: 3320901848
am: 9f984c3d53

Change-Id: Ia3ac7fbf6a0775b26d9cf88c0a7c62635701b34b
2018-09-06 12:42:50 -07:00
Ramesh Katuri
b5597cea85 Fix for NPD in case of single coupling channel element.
Reason for crash:
    For the below reported issues input stream has only one
coupling channel element. As per the specification coupling
channel element should be associated with at least one main
channel element.

We have different output buffers for main channel
and coupling channel. In this error case the coupling
channel output buffer is not getting updated because
there is no main channel, so main decode is called with
output buffer pointing to NULL.
This is the reason for all the issues listed below.

Bug:112551721
Bug:112704700
Bug:112706520
Bug:112710190
Bug:112712274
Bug:112717301
Test: re-run poc
Change-Id: Ife593ca4ae21f05555b6a89092ff76b974e28a67
2018-09-06 09:53:01 -07:00
Ramesh Katuri
ace5ddf259 Fix for crash in aac decode frame
This is an erroneous stream in which element is SCE and
channel config in general audio header is 2.

Added check the handle such erroneous cases

Bug:112705708
Test: re-ran poc
Change-Id: Ia1f057621ae954f6ae53027301cf6f1f6780011b
2018-09-04 11:00:08 -07:00
Ramesh Katuri
69f8d42a89 Fix for stack buffer underflow in sbr
Sbr frame size is not getting updated in all the sbr decoder
calling paths, because of which in one of the paths the number
of samples are passed as 0 to sbr decode call.

Inside the sbr decode call one of the buffer is accessed with
(shifted value of this number of samples - offset),
which is becoming negative in this cause. This negative offset
is causing OOB read access.

Bug:113263695
Test: poc from bug
Change-Id: I8fb5391a6ba9dd4919f8b761de295d02dda685b4
2018-09-04 10:39:04 -07:00
Ramesh Katuri
b3226ce6f8 Formatting changes
Formatting .c and .h files using clang-format
Formatting .s files

Bug: 80493357
Test: compare object sizes
Change-Id: I38296083c9d2d566a6a2564db2e391e4b2bd43a9
2018-06-07 16:52:19 -07:00
Ray Essick
4908247643 Sanitization fixes from new CTS tests
Updates from vendor to remedy issues exposed by new CTS tests

Bug: 77287124
Test: CTS DecoderTest, DecoderTest{AacDrc,XheAac}

@ Sanitizer fixes in libxaac

Fixes few integer overflow sanitizer errors
Progagate few errors
ENABLE_DRC macro is removed
AMMENDMENT1 macro is removed

Change-Id: Ic61163dfd6318bd4a00ed45e1295c819cb0f637b

@ Add support for audio pre-roll and DRC effect type

Also includes the following
MPEG-D DRC parameters related changes
USAC config switch changes
SBR config switch changes

Bug: 80133175
Change-Id: I0ab25641768cf523b66f7b0fcb4137429c1c4a77

@ Fixed trailing spaces

Change-Id: I32de0c9d3f7237e1fbf8dfef1cac485ef8458173

@ Replaced tabs

Change-Id: Ic741ee13d7b978b37edc27d087903caaa40b8d90
2018-05-25 11:35:52 -07:00
Ray Essick
51aa06e124 Bring xHE-AAC into pi-dev branch
bring the multi-commit integration from master to pi-dev

libxaac multi-arch cleanup

Change-Id: Ibcefa14f439e75f48a54955c9abf1a06c418e41e
Change-Id: Ia7a9b1e4de0add847c136f6f545b81dc8087521d
Change-Id: I12c3f8414dc9971017de223e88f292f8982a5c9b

Fix dependency error in Android.bp
Change-Id: Ic54f688736b3f2a70172676e4cee22aea4cbd705

Localized Android.bp
Change-Id: I68c4fc24fca279104c8ce2129fd4a3ed8d116b9b

Import xHE-AAC decoder from Ittiam
Change-Id: I3c8d124033f967b29d6e384cce5c843ee17a7bb1

Bug: 77287124
Test: build, cts DecoderTest
2018-05-17 14:36:48 -07:00