From c3b6454d801638b091b51fe62937e6831a3a37b2 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 22 Feb 2015 16:26:53 +0100
Subject: [PATCH] avutil/fixed_dsp: Check for av_malloc() failure

Fixes CID1271051

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavutil/fixed_dsp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 102a951b695..9f2e8410462 100644
--- a/libavutil/fixed_dsp.c
+++ b/libavutil/fixed_dsp.c
@@ -91,6 +91,10 @@ static void vector_fmul_window_fixed_c(int32_t *dst, const int32_t *src0,
 AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
 {
     AVFixedDSPContext * fdsp = av_malloc(sizeof(AVFixedDSPContext));
+
+    if (!fdsp)
+        return NULL;
+
     fdsp->vector_fmul_window_scaled = vector_fmul_window_fixed_scaled_c;
     fdsp->vector_fmul_window = vector_fmul_window_fixed_c;
 
-- 
GitLab