aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-01-11 23:56:05 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2023-02-25 21:27:12 +0100
commit3ae6feff7ebf7bfbd74c0617ddc8c13adaadfd7b (patch)
tree6cebecf7f904b921d1c27180ef50717c7949129c
parent197dcd28efc96a8297d7483389a39030330c6cb4 (diff)
downloadffmpeg-3ae6feff7ebf7bfbd74c0617ddc8c13adaadfd7b.tar.gz
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@niedermayer.cc> (cherry picked from commit df1a38d5200e14a29903f1027b4548d595c7ff8a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/pngdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 1ba1bb20d0..d63640345b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1238,6 +1238,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);