summaryrefslogtreecommitdiffstats
path: root/libavcodec/flicvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-21 23:45:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-07-08 08:44:24 +0200
commit37708cbae8d6887b80f58a70a1dfa01af6ea2c85 (patch)
treed06ac933ceaa37e77e59fcd7e294c7d2a388dc1c /libavcodec/flicvideo.c
parent79204a1fc8f1988f7d7e6cae2c3b68f513444d38 (diff)
downloadffmpeg-streaming-37708cbae8d6887b80f58a70a1dfa01af6ea2c85.zip
ffmpeg-streaming-37708cbae8d6887b80f58a70a1dfa01af6ea2c85.tar.gz
avcodec/flicvideo: Fix off by 1 error in flic_decode_frame_24BPP()
Fixes: out of array access Fixes: 15360/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-5653837190266880 Fixes: 15412/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-5740537648250880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/flicvideo.c')
-rw-r--r--libavcodec/flicvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index ba5bda4..c0e1e16 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -900,7 +900,7 @@ static int flic_decode_frame_24BPP(AVCodecContext *avctx,
} else {
if (bytestream2_tell(&g2) + 2*byte_run > stream_ptr_after_chunk)
break;
- CHECK_PIXEL_PTR(2 * byte_run);
+ CHECK_PIXEL_PTR(3 * byte_run);
for (j = 0; j < byte_run; j++, pixel_countdown--) {
pixel = bytestream2_get_le24(&g2);
AV_WL24(&pixels[pixel_ptr], pixel);
OpenPOWER on IntegriCloud