avcodec/opus_imdct: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Jan 2015 22:11:44 +0000 (23:11 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Jan 2015 22:36:00 +0000 (23:36 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/opus_imdct.c

index 0a6fca994eca9fdc5eda40a617d8e924f3233098..126e882ea6070a6d0ceed3541fd958115b7350a2 100644 (file)
@@ -105,11 +105,11 @@ av_cold int ff_celt_imdct_init(CeltIMDCTContext **ps, int N)
     s->len4 = len2 / 2;
     s->len2 = len2;
 
-    s->tmp  = av_malloc(len * 2 * sizeof(*s->tmp));
+    s->tmp  = av_malloc_array(len, 2 * sizeof(*s->tmp));
     if (!s->tmp)
         goto fail;
 
-    s->twiddle_exptab  = av_malloc(s->len4 * sizeof(*s->twiddle_exptab));
+    s->twiddle_exptab  = av_malloc_array(s->len4, sizeof(*s->twiddle_exptab));
     if (!s->twiddle_exptab)
         goto fail;