aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-08-11 23:15:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2025-01-01 20:31:08 +0100
commit7eeeda703b599847aa89c7c08bb433d0b3da9590 (patch)
treed1dc87319f44913f46a6dd54d84fe3e0829caab8
parent4c62cbcae2612acbc7ab5e8a7e7815674a6e8df4 (diff)
downloadffmpeg-7eeeda703b599847aa89c7c08bb433d0b3da9590.tar.gz
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@niedermayer.cc>
-rw-r--r--libavcodec/hapdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c
index 918eff7876..70bf592f2a 100644
--- a/libavcodec/hapdec.c
+++ b/libavcodec/hapdec.c
@@ -310,6 +310,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame,
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);