[FFmpeg-cvslog] avcodec/pngdec: dont skip/read chunk twice
Michael Niedermayer
git at videolan.org
Tue Mar 28 00:15:08 EEST 2023
ffmpeg | branch: release/5.0 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jan 11 23:56:05 2023 +0100| [904836c89fbb176f019816ccb32a3517acf6e8f6] | committer: Michael Niedermayer
avcodec/pngdec: dont skip/read chunk twice
Fixes: out of array access
Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-6668158952144896.fuzz
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit df1a38d5200e14a29903f1027b4548d595c7ff8a)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=904836c89fbb176f019816ccb32a3517acf6e8f6
---
libavcodec/pngdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 0bd2dbfca2..111afd9a4a 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1229,6 +1229,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
}
av_log(avctx, AV_LOG_ERROR, ", skipping\n");
bytestream2_skip(&s->gb, length + 8); /* tag */
+ continue;
}
}
tag = bytestream2_get_le32(&s->gb);
More information about the ffmpeg-cvslog
mailing list