1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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>
This commit is contained in:
Michael Niedermayer 2024-08-04 22:00:35 +02:00
parent 79a1cf30d1
commit 3978e81809
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

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