avformat/ape: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Apr 2015 20:50:07 +0000 (22:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Apr 2015 20:50:07 +0000 (22:50 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/ape.c

index 28f73d3..69b001a 100644 (file)
@@ -268,7 +268,7 @@ static int ape_read_header(AVFormatContext * s)
                ape->seektablelength / sizeof(*ape->seektable), ape->totalframes);
         return AVERROR_INVALIDDATA;
     }
-    ape->frames       = av_malloc(ape->totalframes * sizeof(APEFrame));
+    ape->frames       = av_malloc_array(ape->totalframes, sizeof(APEFrame));
     if(!ape->frames)
         return AVERROR(ENOMEM);
     ape->firstframe   = ape->junklength + ape->descriptorlength + ape->headerlength + ape->seektablelength + ape->wavheaderlength;