mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-20 06:11:04 +00: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