diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-25 17:34:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-25 17:53:27 +0100 |
commit | 2f1de5ca139f185b7103caa6e5843b4fa7a78d57 (patch) | |
tree | 7e8902d0152c4ac901ce7aeac7f0b02cdd4c4efe /libavcodec | |
parent | d0879a93eac6ffe052e08e435141f1ae5366c4d3 (diff) | |
download | ffmpeg-2f1de5ca139f185b7103caa6e5843b4fa7a78d57.tar.gz |
avcodec/huffyuvdec: apply vertical filter in steps of 1 line for interlaced BGRA
Fixes out of array read
Fixes: signal_sigsegv_3287332_2301_cov_2994954934_huffyuv.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/huffyuvdec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index 62ed0f97b1..98c6128470 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -1202,11 +1202,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, if (s->predictor == PLANE) { if (s->bitstream_bpp != 32) left[A] = 0; - if ((y & s->interlaced) == 0 && - y < s->height - 1 - s->interlaced) { + if (y < s->height - 1 - s->interlaced) { s->hdsp.add_bytes(p->data[0] + p->linesize[0] * y, p->data[0] + p->linesize[0] * y + - fake_ystride, fake_ystride); + fake_ystride, 4 * width); } } } |