diff options
author | Martin Storsjo <martin@martin.st> | 2012-05-25 19:46:34 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2012-05-25 19:49:59 +0300 |
commit | 9af8cfa60f7c0d51e667d62465b6f9eb7d425e1d (patch) | |
tree | f4f7dac69958193fc072250603b0481e18221527 | |
parent | d9bde6024e87f050c8e29d3b269173340467053a (diff) | |
download | base-9af8cfa60f7c0d51e667d62465b6f9eb7d425e1d.tar.gz |
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
-rw-r--r-- | media/libstagefright/codecs/aacenc/basic_op/oper_32b.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c index 982f4fd44e6d..cc019271c158 100644 --- a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c +++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c @@ -344,8 +344,8 @@ static const Word32 pow2Table[POW2_TABLE_SIZE] = { */ Word32 pow2_xy(Word32 x, Word32 y) { - Word32 iPart; - Word32 fPart; + UWord32 iPart; + UWord32 fPart; Word32 res; Word32 tmp, tmp2; Word32 shift, shift2; |