summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/m4v_h263
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-08-20 19:30:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-20 19:30:57 +0000
commit34272233640d38d904f2b75cc1a914012b424c71 (patch)
tree04d1e1f4865124ab68362eccd638bbd76b3682b6 /media/libstagefright/codecs/m4v_h263
parentdbdcecd6973174cc6119fd6f996be9b1cae23ede (diff)
parent3dcb448f52cf05e7e0434c28bade68e898707053 (diff)
downloadframeworks_av-34272233640d38d904f2b75cc1a914012b424c71.zip
frameworks_av-34272233640d38d904f2b75cc1a914012b424c71.tar.gz
frameworks_av-34272233640d38d904f2b75cc1a914012b424c71.tar.bz2
am 3dcb448f: am 4bb01def: am 84a4221e: am a9b3cd3c: am 5221133b: am b2ae4351: libstagefright: fix overflow in pvdec_api.cpp.
* commit '3dcb448f52cf05e7e0434c28bade68e898707053': libstagefright: fix overflow in pvdec_api.cpp.
Diffstat (limited to 'media/libstagefright/codecs/m4v_h263')
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp4
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;
}