diff options
author | Ramesh Katuri <ramesh.katuri@ittiam.com> | 2018-09-26 10:59:44 +0530 |
---|---|---|
committer | Ray Essick <essick@google.com> | 2018-10-01 16:07:01 -0700 |
commit | cb9230e387f04fa6a95c3ee10b2544f0178a03ee (patch) | |
tree | 5454922187c4c08e6eef0208d91a213acea6e047 /decoder/ixheaacd_bitbuffer.c | |
parent | cc01cad899d48a9378171f437e148f96f949751d (diff) | |
download | libxaac-cb9230e387f04fa6a95c3ee10b2544f0178a03ee.tar.gz |
Fix for heap buffer overflow in ixheaacd_aac_read_2bytes
Bug:116474108
Test: vendor
Change-Id: I150ac7ffc3d0b447fe09f8b95e51882c7a63f8a1
Diffstat (limited to 'decoder/ixheaacd_bitbuffer.c')
-rw-r--r-- | decoder/ixheaacd_bitbuffer.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/decoder/ixheaacd_bitbuffer.c b/decoder/ixheaacd_bitbuffer.c index 3c25161..9cd404a 100644 --- a/decoder/ixheaacd_bitbuffer.c +++ b/decoder/ixheaacd_bitbuffer.c @@ -118,29 +118,6 @@ UWORD32 ixheaacd_aac_read_byte(UWORD8 **ptr_read_next, WORD32 *bit_pos, return 1; } -UWORD32 ixheaacd_aac_read_2bytes(UWORD8 **ptr_read_next, WORD32 *bit_pos, - WORD32 *readword) { - UWORD8 *v = *ptr_read_next; - WORD32 bits_consumed = *bit_pos; - - if ((bits_consumed - 16) >= 0) { - *readword = (*readword << 8) | *v; - v++; - *readword = (*readword << 8) | *v; - v++; - bits_consumed -= 16; - - } else if ((bits_consumed - 8) >= 0) { - *readword = (*readword << 8) | *v; - v++; - bits_consumed -= 8; - } - - *bit_pos = bits_consumed; - *ptr_read_next = v; - return 1; -} - UWORD32 ixheaacd_aac_read_byte_corr1(UWORD8 **ptr_read_next, WORD32 *ptr_bit_pos, WORD32 *readword, UWORD8 *p_bit_buf_end) { |