avcodec/dnxhdenc: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 11 Apr 2014 04:31:45 +0000 (06:31 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 11 Apr 2014 04:31:45 +0000 (06:31 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dnxhdenc.c

index 4fda9ee..5d742a7 100644 (file)
@@ -879,7 +879,7 @@ static void radix_sort_pass(RCCMPEntry *dst, const RCCMPEntry *data, int size, i
 static void radix_sort(RCCMPEntry *data, int size)
 {
     int buckets[RADIX_PASSES][NBUCKETS];
-    RCCMPEntry *tmp = av_malloc(sizeof(*tmp) * size);
+    RCCMPEntry *tmp = av_malloc_array(size, sizeof(*tmp));
     radix_count(data, size, buckets);
     radix_sort_pass(tmp, data, size, buckets[0], 0);
     radix_sort_pass(data, tmp, size, buckets[1], 1);