[FFmpeg-cvslog] avutil/fixed_dsp: Check for av_malloc() failure

Michael Niedermayer git at videolan.org
Sun Feb 22 16:42:09 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Feb 22 16:26:53 2015 +0100| [c3b6454d801638b091b51fe62937e6831a3a37b2] | committer: Michael Niedermayer

avutil/fixed_dsp: Check for av_malloc() failure

Fixes CID1271051

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3b6454d801638b091b51fe62937e6831a3a37b2
---

 libavutil/fixed_dsp.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 102a951..9f2e841 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;
 



More information about the ffmpeg-cvslog mailing list