diff options
author | Wei Jia <wjia@google.com> | 2015-08-21 16:49:51 -0700 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-19 03:00:29 +0200 |
commit | 1cf71322e0953e67d1c8ea7d37366c9e443ec4d9 (patch) | |
tree | 19ef62407d4e493f285964ca213b1f74e5e0f229 /media | |
parent | 6067ac044bec6a422c7782973b8627a925fd0d8f (diff) | |
download | frameworks_av-master.zip frameworks_av-master.tar.gz frameworks_av-master.tar.bz2 |
Bug: 23416608
Change-Id: I4dacd38ed42db8f4887c3ee386dc909451f4346f
Tested-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 91ba093..6fb05d2 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1912,6 +1912,9 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { def.nBufferCountActual, def.nBufferSize, portIndex == kPortIndexInput ? "input" : "output"); + if (def.nBufferSize != 0 && def.nBufferCountActual > SIZE_MAX / def.nBufferSize) { + return BAD_VALUE; + } size_t totalSize = def.nBufferCountActual * def.nBufferSize; mDealer[portIndex] = new MemoryDealer(totalSize, "OMXCodec"); |