diff options
author | Wei Jia <wjia@google.com> | 2015-08-20 04:04:08 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-20 04:04:08 +0000 |
commit | 5221133bfa1585b4488b01cad165627b1cd17077 (patch) | |
tree | 6824c47d8b1cb36beb2c04f49e72a7aa1bcc7940 | |
parent | 6b52d191f96c611b768318eec74d25908da76d03 (diff) | |
parent | b2ae4351539de9aa4667fcb3e02ba40d9c6bd094 (diff) | |
download | frameworks_av-5221133bfa1585b4488b01cad165627b1cd17077.zip frameworks_av-5221133bfa1585b4488b01cad165627b1cd17077.tar.gz frameworks_av-5221133bfa1585b4488b01cad165627b1cd17077.tar.bz2 |
am b2ae4351: libstagefright: fix overflow in pvdec_api.cpp.
* commit 'b2ae4351539de9aa4667fcb3e02ba40d9c6bd094':
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 419e3f4..30d5cbd 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/src/pvdec_api.cpp @@ -338,7 +338,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*/ @@ -368,7 +368,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; } |