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
1 changed files with 1 additions and 0 deletions

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