History

avcodec/iff: Clear ham_buf

Fixes: use of uninitialized memory Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-6651797156724736

Michael Niedermayer committed 1 year ago

Commit 7e9e7cb1 parent 715df4b1 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/iff.c+1−1
@@ -279,7 +279,7 @@ static int extract_header(AVCodecContext *const avctx, · 278 unmodified lines
279279 if (avctx->codec_tag == MKTAG('P', 'B', 'M', ' ') && s->ham == 4)
280280 extra_space = 4;
281281
282− s->ham_buf = av_malloc((s->planesize * 8) + AV_INPUT_BUFFER_PADDING_SIZE);
282+ s->ham_buf = av_mallocz((s->planesize * 8) + AV_INPUT_BUFFER_PADDING_SIZE);
283283 if (!s->ham_buf)
284284 return AVERROR(ENOMEM);
285285

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