Commit 98b8bf12 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pngdec: Use av_malloc_array()

Suggested-by: ubitux
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c08b06c2
......@@ -980,7 +980,7 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s,
return AVERROR_PATCHWELCOME;
}
buffer = av_malloc(s->image_linesize * s->height);
buffer = av_malloc_array(s->image_linesize, s->height);
if (!buffer)
return AVERROR(ENOMEM);
......
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