Commit 713e62e9 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/faxcompr: use av_malloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 36053aef
......@@ -287,8 +287,8 @@ int ff_ccitt_unpack(AVCodecContext *avctx, const uint8_t *src, int srcsize,
int runsize = avctx->width + 2;
int has_eol;
runs = av_malloc(runsize * sizeof(runs[0]));
ref = av_malloc(runsize * sizeof(ref[0]));
runs = av_malloc_array(runsize, sizeof(runs[0]));
ref = av_malloc_array(runsize, sizeof(ref[0]));
if (!runs || !ref) {
ret = AVERROR(ENOMEM);
goto fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment