Skip to content

Commit 9af8cfa

Browse files
committed
stagefright aacenc: Fix reading out of bounds in pow2_xy
This fixes cases where x was a large number, causing fPart to exceed the 32 bit signed integer range (while fitting in an unsigned 32 bit integer), making the table index a negative number. Change-Id: I674047db65f89148a93d218c138b42cd8305f80e
1 parent d9bde60 commit 9af8cfa

File tree

1 file changed

+2
-2
lines changed
  • media/libstagefright/codecs/aacenc/basic_op

1 file changed

+2
-2
lines changed

media/libstagefright/codecs/aacenc/basic_op/oper_32b.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ static const Word32 pow2Table[POW2_TABLE_SIZE] = {
344344
*/
345345
Word32 pow2_xy(Word32 x, Word32 y)
346346
{
347-
Word32 iPart;
348-
Word32 fPart;
347+
UWord32 iPart;
348+
UWord32 fPart;
349349
Word32 res;
350350
Word32 tmp, tmp2;
351351
Word32 shift, shift2;

0 commit comments

Comments
 (0)