diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-08-04 22:00:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-08-05 23:17:46 +0200 |
commit | 3978e81809a3daf278199849f7bbeacbffb9fa09 (patch) | |
tree | e958515969a642bb890a00695a4735f6e3ab9fcb | |
parent | 79a1cf30d1289f90da682263ba160f6e4a5a7bf1 (diff) | |
download | ffmpeg-3978e81809a3daf278199849f7bbeacbffb9fa09.tar.gz |
avformat/img2dec: Clear padding data after EOF
Fixes: use-of-uninitialized-value
Fixes: 70852/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5179190066872320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Kacper Michajlow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/img2dec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 20b1bc31f6..3389fa818e 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -563,6 +563,7 @@ int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt) } goto fail; } else { + memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE); s->img_count++; s->img_number++; s->pts++; |