avcodec/mvha: Clear remaining space after inflate()

Fixes: use-of-uninitialized-value
Fixes: 70838/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVHA_fuzzer-4878509466517504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-08-03 19:11:33 +02:00
parent a0f22218f7
commit cba4e2e40d
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
av_log(avctx, AV_LOG_ERROR, "Inflate error: %d\n", ret);
return AVERROR_EXTERNAL;
}
if (zstream->avail_out > 0)
memset(zstream->next_out, 0, zstream->avail_out);
}
}
} else if (type == MKTAG('H','U','F','Y')) {