diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 18:19:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 18:20:25 +0100 |
commit | 969e75eb80dad51481152f868dafa802579a19aa (patch) | |
tree | 4890ae40916f891e8415215d229d606e3603b99e /libavcodec/mjpegdec.c | |
parent | e5e422bcc3e6deee8c5c5bf8f5aeca2c051542f5 (diff) | |
download | ffmpeg-streaming-969e75eb80dad51481152f868dafa802579a19aa.zip ffmpeg-streaming-969e75eb80dad51481152f868dafa802579a19aa.tar.gz |
mjpegdec: Fix out of array read in unescaping code
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 78af858..78a0453 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1590,7 +1590,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, while ((src + t < buf_end) && x == 0xff) x = src[t++]; if (x & 0x80) { - t -= 2; + t -= FFMIN(2, t); break; } } |