X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmss4.c;h=07d90ed4f3cdef69bd64b4154c59e621c63d37da;hb=9b964690e39928af616d88b3e8ab47a7db14a538;hp=c5b8e07aaa0fd6f0c6a5fdf459056e9b0577f170;hpb=d078d57fb769e83c00c402f2f34978c1cd50dce7;p=ffmpeg diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index c5b8e07aaa0..07d90ed4f3c 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -650,7 +650,7 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) } for (i = 0; i < 3; i++) { c->dc_stride[i] = FFALIGN(avctx->width, 16) >> (2 + !!i); - c->prev_dc[i] = av_malloc(sizeof(**c->prev_dc) * c->dc_stride[i]); + c->prev_dc[i] = av_malloc_array(c->dc_stride[i], sizeof(**c->prev_dc)); if (!c->prev_dc[i]) { av_log(avctx, AV_LOG_ERROR, "Cannot allocate buffer\n"); mss4_free_vlcs(c);