1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-10 09:31:06 +02:00

avcodec/pngdec: Use av_malloc_array()

Suggested-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-10-11 16:39:41 +02:00
parent c08b06c225
commit 98b8bf12bc

View File

@ -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);