Browse Source

avcodec/sunrast: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
c4f1abecb1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/sunrast.c

+ 1
- 1
libavcodec/sunrast.c View File

@@ -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…
Cancel
Save