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:
parent
c08b06c225
commit
98b8bf12bc
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user