1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +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; return AVERROR_PATCHWELCOME;
} }
buffer = av_malloc(s->image_linesize * s->height); buffer = av_malloc_array(s->image_linesize, s->height);
if (!buffer) if (!buffer)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);