avcodec/escape130: Initialize old_y_avg
Fixes: use of uninitialized memory Found-by: Carl Sampson <carl.sampson@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -125,7 +125,7 @@ static av_cold int escape130_decode_init(AVCodecContext *avctx)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
s->old_y_avg = av_malloc(avctx->width * avctx->height / 4);
|
||||
s->old_y_avg = av_mallocz(avctx->width * avctx->height / 4);
|
||||
s->buf1 = av_malloc(avctx->width * avctx->height * 3 / 2);
|
||||
s->buf2 = av_malloc(avctx->width * avctx->height * 3 / 2);
|
||||
if (!s->old_y_avg || !s->buf1 || !s->buf2) {
|
||||
|
||||
Reference in New Issue
Block a user