summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-03-01 15:35:23 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-03-01 15:35:23 -0800
commitadbe671920f2f7f346bbcb3d06ad1fba7403a455 (patch)
treec66995790a18c22a9d00bbfa73714f96b9b142e1 /media/libstagefright/codecs
parent1f5fbc3f93f2be13a31288723d4ba9e48b785262 (diff)
parent715c78b933f8dec04882ebb73acd61fdd42c6c64 (diff)
downloadframeworks_base-adbe671920f2f7f346bbcb3d06ad1fba7403a455.zip
frameworks_base-adbe671920f2f7f346bbcb3d06ad1fba7403a455.tar.gz
frameworks_base-adbe671920f2f7f346bbcb3d06ad1fba7403a455.tar.bz2
am 715c78b9: am 225eec8d: am f9d4ba77: am 69aae36e: Merge "stagefright aacenc: Safeguard against overwriting bits"
* commit '715c78b933f8dec04882ebb73acd61fdd42c6c64': stagefright aacenc: Safeguard against overwriting bits
Diffstat (limited to 'media/libstagefright/codecs')
-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;