ffmpeg | branch: release/6.1 | Michael Niedermayer <mich...@niedermayer.cc> | 
Sun Aug  3 14:44:04 2025 +0200| [7d62dfda4cf09a5971ad2298061ef25dea071be9] | 
committer: Michael Niedermayer

avcodec/iff: Clear ham_buf

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

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit 7e9e7cb3b65167f37dcbfcf6a2ee308548af4e73)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d62dfda4cf09a5971ad2298061ef25dea071be9
---

 libavcodec/iff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 32d771b887..4f1519483b 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -278,7 +278,7 @@ static int extract_header(AVCodecContext *const avctx,
         if (avctx->codec_tag == MKTAG('P', 'B', 'M', ' ') && s->ham == 4)
             extra_space = 4;
 
-        s->ham_buf = av_malloc((s->planesize * 8) + 
AV_INPUT_BUFFER_PADDING_SIZE);
+        s->ham_buf = av_mallocz((s->planesize * 8) + 
AV_INPUT_BUFFER_PADDING_SIZE);
         if (!s->ham_buf)
             return AVERROR(ENOMEM);
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to