[FFmpeg-cvslog] avcodec/hapdec: Clear tex buffer
Michael Niedermayer
git at videolan.org
Thu Feb 27 19:08:30 EET 2025
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Aug 11 23:15:32 2024 +0200| [ef2e5030a9f1b2ba17fc252f8e5bdd1595f5e2cf] | committer: Michael Niedermayer
avcodec/hapdec: Clear tex buffer
The code following makes no attempt to initialize all of the buffer
Fixes: use of uninitialized value
Fixes: 70980/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5329909059223552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 7eeeda703b599847aa89c7c08bb433d0b3da9590)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef2e5030a9f1b2ba17fc252f8e5bdd1595f5e2cf
---
libavcodec/hapdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c
index 692bb6e750..0f9d7fb6c4 100644
--- a/libavcodec/hapdec.c
+++ b/libavcodec/hapdec.c
@@ -372,6 +372,7 @@ static int hap_decode(AVCodecContext *avctx, void *data,
ret = av_reallocp(&ctx->tex_buf, ctx->tex_size);
if (ret < 0)
return ret;
+ memset(ctx->tex_buf, 0, ctx->tex_size);
avctx->execute2(avctx, decompress_chunks_thread, NULL,
ctx->chunk_results, ctx->chunk_count);
More information about the ffmpeg-cvslog
mailing list