Loading media/libstagefright/codecs/m4v_h263/dec/src/vop.cpp +13 −5 Original line number Original line Diff line number Diff line Loading @@ -15,6 +15,8 @@ * and limitations under the License. * and limitations under the License. * ------------------------------------------------------------------- * ------------------------------------------------------------------- */ */ #include "log/log.h" #include "mp4dec_lib.h" #include "mp4dec_lib.h" #include "bitstream.h" #include "bitstream.h" #include "vlc_decode.h" #include "vlc_decode.h" Loading Loading @@ -1336,8 +1338,7 @@ PV_STATUS DecodeShortHeader(VideoDecData *video, Vop *currVop) } } tmpvar = BitstreamReadBits16(stream, 9); tmpvar = BitstreamReadBits16(stream, 9); video->displayWidth = (tmpvar + 1) << 2; int tmpDisplayWidth = (tmpvar + 1) << 2; video->width = (video->displayWidth + 15) & -16; /* marker bit */ /* marker bit */ if (!BitstreamRead1Bits(stream)) if (!BitstreamRead1Bits(stream)) { { Loading @@ -1350,14 +1351,21 @@ PV_STATUS DecodeShortHeader(VideoDecData *video, Vop *currVop) status = PV_FAIL; status = PV_FAIL; goto return_point; goto return_point; } } video->displayHeight = tmpvar << 2; int tmpDisplayHeight = tmpvar << 2; video->height = (video->displayHeight + 15) & -16; int tmpHeight = (tmpDisplayHeight + 15) & -16; int tmpWidth = (tmpDisplayWidth + 15) & -16; if (video->height * video->width > video->size) if (tmpHeight * tmpWidth > video->size) { { // This is just possibly "b/37079296". ALOGE("b/37079296"); status = PV_FAIL; status = PV_FAIL; goto return_point; goto return_point; } } video->displayWidth = tmpDisplayWidth; video->width = tmpWidth; video->displayHeight = tmpDisplayHeight; video->height = tmpHeight; video->nTotalMB = video->width / MB_SIZE * video->height / MB_SIZE; video->nTotalMB = video->width / MB_SIZE * video->height / MB_SIZE; Loading Loading
media/libstagefright/codecs/m4v_h263/dec/src/vop.cpp +13 −5 Original line number Original line Diff line number Diff line Loading @@ -15,6 +15,8 @@ * and limitations under the License. * and limitations under the License. * ------------------------------------------------------------------- * ------------------------------------------------------------------- */ */ #include "log/log.h" #include "mp4dec_lib.h" #include "mp4dec_lib.h" #include "bitstream.h" #include "bitstream.h" #include "vlc_decode.h" #include "vlc_decode.h" Loading Loading @@ -1336,8 +1338,7 @@ PV_STATUS DecodeShortHeader(VideoDecData *video, Vop *currVop) } } tmpvar = BitstreamReadBits16(stream, 9); tmpvar = BitstreamReadBits16(stream, 9); video->displayWidth = (tmpvar + 1) << 2; int tmpDisplayWidth = (tmpvar + 1) << 2; video->width = (video->displayWidth + 15) & -16; /* marker bit */ /* marker bit */ if (!BitstreamRead1Bits(stream)) if (!BitstreamRead1Bits(stream)) { { Loading @@ -1350,14 +1351,21 @@ PV_STATUS DecodeShortHeader(VideoDecData *video, Vop *currVop) status = PV_FAIL; status = PV_FAIL; goto return_point; goto return_point; } } video->displayHeight = tmpvar << 2; int tmpDisplayHeight = tmpvar << 2; video->height = (video->displayHeight + 15) & -16; int tmpHeight = (tmpDisplayHeight + 15) & -16; int tmpWidth = (tmpDisplayWidth + 15) & -16; if (video->height * video->width > video->size) if (tmpHeight * tmpWidth > video->size) { { // This is just possibly "b/37079296". ALOGE("b/37079296"); status = PV_FAIL; status = PV_FAIL; goto return_point; goto return_point; } } video->displayWidth = tmpDisplayWidth; video->width = tmpWidth; video->displayHeight = tmpDisplayHeight; video->height = tmpHeight; video->nTotalMB = video->width / MB_SIZE * video->height / MB_SIZE; video->nTotalMB = video->width / MB_SIZE * video->height / MB_SIZE; Loading