Commit 969e75eb authored by Michael Niedermayer's avatar Michael Niedermayer

mjpegdec: Fix out of array read in unescaping code

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e5e422bc
...@@ -1590,7 +1590,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, ...@@ -1590,7 +1590,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
while ((src + t < buf_end) && x == 0xff) while ((src + t < buf_end) && x == 0xff)
x = src[t++]; x = src[t++];
if (x & 0x80) { if (x & 0x80) {
t -= 2; t -= FFMIN(2, t);
break; 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