diff options
author | Wei Jia <wjia@google.com> | 2015-08-20 03:36:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-20 03:36:30 +0000 |
commit | 3ec4f55039b29c132b4ed3a86048e278fe95248b (patch) | |
tree | 36381ac6347461e75e0231ba1a9e5e613a3b2095 /media/libstagefright/codecs | |
parent | 1bbf2488ba4d9b5230f0274308bdd5bffb2ffeb3 (diff) | |
parent | d7bb1cd786e5ea4ac61119cc1a08082474f7787b (diff) | |
download | frameworks_av-3ec4f55039b29c132b4ed3a86048e278fe95248b.zip frameworks_av-3ec4f55039b29c132b4ed3a86048e278fe95248b.tar.gz frameworks_av-3ec4f55039b29c132b4ed3a86048e278fe95248b.tar.bz2 |
Merge "libstagefright: fix overflow in pvdec_api.cpp." into mnc-dev
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r-- | media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp index 79e4e4f..c1720c6 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp @@ -343,7 +343,7 @@ Bool PVAllocVideoData(VideoDecControls *decCtrl, int width, int height, int nLay video->prevVop->uChan = video->prevVop->yChan + size; video->prevVop->vChan = video->prevVop->uChan + (size >> 2); #else - if (size > INT32_MAX / 3 * 2) { + if (size > INT32_MAX / 3) { return PV_FALSE; } video->currVop->yChan = (PIXEL *) oscl_malloc(size * 3 / 2); /* Allocate memory for all VOP OKA 3/2/1*/ @@ -373,7 +373,7 @@ Bool PVAllocVideoData(VideoDecControls *decCtrl, int width, int height, int nLay { oscl_memset(video->prevEnhcVop, 0, sizeof(Vop)); #ifndef PV_MEMORY_POOL - if (size > INT32_MAX / 3 * 2) { + if (size > INT32_MAX / 3) { return PV_FALSE; } |