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
Unified · Split
| @@ -310,6 +310,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, · 309 unmodified lines | |||
| 310 | ret = av_reallocp(&ctx->tex_buf, ctx->tex_size); | 310 | ret = av_reallocp(&ctx->tex_buf, ctx->tex_size); |
| 311 | if (ret < 0) | 311 | if (ret < 0) |
| 312 | return ret; | 312 | return ret; |
| 313 | memset(ctx->tex_buf, 0, ctx->tex_size); | ||
| 313 | 314 | ||
| 314 | avctx->execute2(avctx, decompress_chunks_thread, NULL, | 315 | avctx->execute2(avctx, decompress_chunks_thread, NULL, |
| 315 | ctx->chunk_results, ctx->chunk_count); | 316 | ctx->chunk_results, ctx->chunk_count); |