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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user