mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/sunrast: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e6f1601d6d
commit
c4f1abecb1
@ -127,7 +127,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
|
||||
buf += maplength;
|
||||
|
||||
if (maplength && depth < 8) {
|
||||
ptr = ptr2 = av_malloc((w + 15) * h);
|
||||
ptr = ptr2 = av_malloc_array((w + 15), h);
|
||||
if (!ptr)
|
||||
return AVERROR(ENOMEM);
|
||||
stride = (w + 15 >> 3) * depth;
|
||||
|
Loading…
Reference in New Issue
Block a user