History

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

Michael Niedermayer committed 2 years ago

Commit 7eeeda71 parent 4c62cbc1 file · +1 −0Browse files

Unified · Split

libavcodec/hapdec.c+1−0
@@ -310,6 +310,7 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, · 309 unmodified lines
310310 ret = av_reallocp(&ctx->tex_buf, ctx->tex_size);
311311 if (ret < 0)
312312 return ret;
313+ memset(ctx->tex_buf, 0, ctx->tex_size);
313314
314315 avctx->execute2(avctx, decompress_chunks_thread, NULL,
315316 ctx->chunk_results, ctx->chunk_count);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t