diff options
author | Wei Jia <wjia@google.com> | 2015-06-08 22:15:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-08 22:15:17 +0000 |
commit | 0b305f2d8f328426f5c59b5d5f2707ffefe35a5c (patch) | |
tree | 520d6bb5c509dc9aea3e511b859060da0fc7279e /media/libstagefright/MPEG4Writer.cpp | |
parent | d46a6b9fd8b2a4f9098757384711e2cd03a91651 (diff) | |
parent | 2177f21c1ae5bf5cb8c1113a1adbe1fd7db34206 (diff) | |
download | frameworks_av-0b305f2d8f328426f5c59b5d5f2707ffefe35a5c.zip frameworks_av-0b305f2d8f328426f5c59b5d5f2707ffefe35a5c.tar.gz frameworks_av-0b305f2d8f328426f5c59b5d5f2707ffefe35a5c.tar.bz2 |
Merge "MPEG4Writer: add check to ensure no integer overflow on allocation." into mnc-dev
Diffstat (limited to 'media/libstagefright/MPEG4Writer.cpp')
-rw-r--r-- | media/libstagefright/MPEG4Writer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index 867ce0b..47f114a 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -113,6 +113,8 @@ private: mCurrTableEntriesElement(NULL) { CHECK_GT(mElementCapacity, 0); CHECK_GT(mEntryCapacity, 0); + // Ensure no integer overflow on allocation in add(). + CHECK_LT(mEntryCapacity, UINT32_MAX / mElementCapacity); } // Free the allocated memory. |