From 263a85e2a2127396f8a2b0c329ec798e1ea015ad Mon Sep 17 00:00:00 2001 From: Umar Pathan Date: Mon, 7 Sep 2026 00:32:19 +0200 Subject: [PATCH] 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) --- libavcodec/mscc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);