diff options
author | Wei Jia <wjia@google.com> | 2015-08-20 04:30:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-20 04:30:33 +0000 |
commit | 3dcb448f52cf05e7e0434c28bade68e898707053 (patch) | |
tree | 6816a65a478e5bdaa9b0176570ba5a4afaa28c97 | |
parent | 8df49713bafd092f660f02e2c252d03581b66928 (diff) | |
parent | 4bb01def2c34e8b92a6640190b42f8555e989d60 (diff) | |
download | frameworks_av-3dcb448f52cf05e7e0434c28bade68e898707053.zip frameworks_av-3dcb448f52cf05e7e0434c28bade68e898707053.tar.gz frameworks_av-3dcb448f52cf05e7e0434c28bade68e898707053.tar.bz2 |
am 4bb01def: am 84a4221e: am a9b3cd3c: am 5221133b: am b2ae4351: libstagefright: fix overflow in pvdec_api.cpp.
* commit '4bb01def2c34e8b92a6640190b42f8555e989d60':
libstagefright: fix overflow in pvdec_api.cpp.
-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; } |