Commit 32c4b504 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 84d8b4fb
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment