Commit 263a85e2a2 for ffmpeg
commit 263a85e2a2127396f8a2b0c329ec798e1ea015ad
Author: Umar Pathan <hello@umar.ac>
Date: Mon Sep 7 00:32:19 2026 +0200
avcodec/mscc: avcodec/mscc: allocate the RLE buffer with av_mallocz to avoid heap disclosure
Fixes: use of uninitialized memory
Fixes: poc.avi
Fixes: ROv3JuiJJEdT
Found-by: Umar Pathan (Umar0x)
diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c
index ba48fc08d9..bc87169065 100644
--- a/libavcodec/mscc.c
+++ b/libavcodec/mscc.c
@@ -233,7 +233,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR(ENOMEM);
s->uncomp_size = avctx->height * stride;
- if (!(s->uncomp_buf = av_malloc(s->uncomp_size)))
+ if (!(s->uncomp_buf = av_mallocz(s->uncomp_size)))
return AVERROR(ENOMEM);
return ff_inflate_init(&s->zstream, avctx);