diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 21:19:53 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 21:20:25 +0400 |
commit | 969e75eb80dad51481152f868dafa802579a19aa (patch) | |
tree | 4890ae40916f891e8415215d229d606e3603b99e | |
parent | e5e422bcc3e6deee8c5c5bf8f5aeca2c051542f5 (diff) |
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>
-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 78af858695..78a0453d57 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; } } |