1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/mpegvideodec: fix hypothetical pointer overflow in mpegvideo_probe()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-15 13:39:56 +01:00
parent 84d8b4fb81
commit 32c4b504b4

View File

@ -52,11 +52,11 @@ static int mpegvideo_probe(AVProbeData *p)
j = -1;
if (ptr[j + 8] & 2)
j+= 64;
if (ptr + j >= end)
if (j >= end - ptr)
break;
if (ptr[j + 8] & 1)
j+= 64;
if (ptr + j >= end)
if (j >= end - ptr)
break;
if (AV_RB24(ptr + j + 9) & 0xFFFFFE)
break;