avformat/xmv: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Apr 2014 11:45:26 +0000 (13:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Apr 2014 11:51:48 +0000 (13:51 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/xmv.c

index 705a302..6eac4d2 100644 (file)
@@ -182,7 +182,7 @@ static int xmv_read_header(AVFormatContext *s)
 
     avio_skip(pb, 2); /* Unknown (padding?) */
 
-    xmv->audio = av_malloc(xmv->audio_track_count * sizeof(XMVAudioPacket));
+    xmv->audio = av_malloc_array(xmv->audio_track_count, sizeof(XMVAudioPacket));
     if (!xmv->audio) {
         ret = AVERROR(ENOMEM);
         goto fail;