diff options
author | Michael Niedermayer | 2015-03-15 13:39:56 +0100 |
---|---|---|
committer | Michael Niedermayer | 2015-03-15 13:39:56 +0100 |
commit | 32c4b504b4ba16ef05ab474541150c39f758746c (patch) | |
tree | baaab69f3f88bfdd648bfd31c6bf3b7af8084d06 | |
parent | 84d8b4fb812c2a7eed31c3abc6bab2ec747b7666 (diff) |
avformat/mpegvideodec: fix hypothetical pointer overflow in mpegvideo_probe()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mpegvideodec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c index 5ea5569379..aca962123b 100644 --- a/libavformat/mpegvideodec.c +++ b/libavformat/mpegvideodec.c @@ -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; |