mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 02:50:11 +01:00
tools/target_dec_fuzzer: Check that FFv1 doesnt leave uninitialized memory in its buffers
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -129,7 +129,14 @@ static int fuzz_video_get_buffer(AVCodecContext *ctx, AVFrame *frame)
|
|||||||
|
|
||||||
frame->extended_data = frame->data;
|
frame->extended_data = frame->data;
|
||||||
for (i = 0; i < 4 && size[i]; i++) {
|
for (i = 0; i < 4 && size[i]; i++) {
|
||||||
frame->buf[i] = av_buffer_allocz(size[i]);
|
switch(ctx->codec_id) {
|
||||||
|
case AV_CODEC_ID_FFV1:
|
||||||
|
frame->buf[i] = av_buffer_alloc(size[i]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
frame->buf[i] = av_buffer_allocz(size[i]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!frame->buf[i])
|
if (!frame->buf[i])
|
||||||
goto fail;
|
goto fail;
|
||||||
frame->data[i] = frame->buf[i]->data;
|
frame->data[i] = frame->buf[i]->data;
|
||||||
|
|||||||
Reference in New Issue
Block a user