1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-17 20:17:55 +02:00

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>
This commit is contained in:
Michael Niedermayer 2023-01-11 23:56:05 +01:00
parent 197dcd28ef
commit 3ae6feff7e
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -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);