summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2012-05-25 19:46:34 +0300
committerJean-Baptiste Queru <jbq@google.com>2012-05-25 12:19:43 -0700
commitf8321d624f4bbbfcf01d59f346d3eb390f75f24c (patch)
tree5054e6f4cb74c9ae47247667b56b4bae35e7fde7 /media/libstagefright/codecs
parentf655483263128529bc01aa1c2e80c229a2d169b8 (diff)
downloadframeworks_av-f8321d624f4bbbfcf01d59f346d3eb390f75f24c.zip
frameworks_av-f8321d624f4bbbfcf01d59f346d3eb390f75f24c.tar.gz
frameworks_av-f8321d624f4bbbfcf01d59f346d3eb390f75f24c.tar.bz2
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
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/aacenc/basic_op/oper_32b.c4
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 982f4fd..cc01927 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;