1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00

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)
This commit is contained in:
Umar Pathan
2026-09-07 00:32:19 +02:00
committed by michaelni
parent be21a3957c
commit 263a85e2a2

View File

@@ -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);