diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-03 21:08:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-03 21:32:15 +0200 |
commit | 891376d26108e0077f8456195770bbcb839fd02f (patch) | |
tree | cc47002b5802693efb10a15d168be8b485809a6c /libavcodec | |
parent | 24a5cd720d579634ab7140f4cb7fa09fe4b780e4 (diff) | |
download | ffmpeg-891376d26108e0077f8456195770bbcb839fd02f.tar.gz |
avcodec/qpeg: fix off by 1 error in MV bounds check
Fixes out of array access
Fixes: asan_heap-oob_153760f_4_asan_heap-oob_1d7a4cf_164_VWbig6.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dd3bfe3cc1ca26d0fff3a3baf61a40207032143f)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/qpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 73d652e5d8..a9e7898eeb 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -163,7 +163,7 @@ static void qpeg_decode_inter(QpegContext *qctx, uint8_t *dst, /* check motion vector */ if ((me_x + filled < 0) || (me_x + me_w + filled > width) || - (height - me_y - me_h < 0) || (height - me_y > orig_height) || + (height - me_y - me_h < 0) || (height - me_y >= orig_height) || (filled + me_w > width) || (height - me_h < 0)) av_log(NULL, AV_LOG_ERROR, "Bogus motion vector (%i,%i), block size %ix%i at %i,%i\n", me_x, me_y, me_w, me_h, filled, height); |