summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-02-29 15:44:28 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-02-29 15:44:28 -0800
commitf9d4ba77f45d8f0efe97abb28247cbca12836dca (patch)
tree2bfb705ad9e00555eeffd4fb9d2e521e5c800206 /media/libstagefright
parentf418738c64413b818e2dc507c912c2678876632f (diff)
parent69aae36e900cf7114c5895618747906951a11730 (diff)
downloadframeworks_base-f9d4ba77f45d8f0efe97abb28247cbca12836dca.zip
frameworks_base-f9d4ba77f45d8f0efe97abb28247cbca12836dca.tar.gz
frameworks_base-f9d4ba77f45d8f0efe97abb28247cbca12836dca.tar.bz2
am 69aae36e: Merge "stagefright aacenc: Safeguard against overwriting bits"
* commit '69aae36e900cf7114c5895618747906951a11730': stagefright aacenc: Safeguard against overwriting bits
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/codecs/aacenc/src/bitbuffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/aacenc/src/bitbuffer.c b/media/libstagefright/codecs/aacenc/src/bitbuffer.c
index a706893..0ce93d3 100644
--- a/media/libstagefright/codecs/aacenc/src/bitbuffer.c
+++ b/media/libstagefright/codecs/aacenc/src/bitbuffer.c
@@ -152,6 +152,7 @@ Word16 WriteBits(HANDLE_BIT_BUF hBitBuf,
wBitPos = hBitBuf->wBitPos;
wBitPos += noBitsToWrite;
+ writeValue &= ~(0xffffffff << noBitsToWrite); // Mask out everything except the lowest noBitsToWrite bits
writeValue <<= 32 - wBitPos;
writeValue |= hBitBuf->cache;