[vlc-commits] soxr: add missing alloc check

Thomas Guillem git at videolan.org
Tue May 5 16:02:42 CEST 2020


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May  4 14:36:50 2020 +0200| [63f2f9db0e87320242646ffcc18a32fd6699e7d7] | committer: Thomas Guillem

soxr: add missing alloc check

(cherry picked from commit 99d117b40de69b721f57aeba77563c600fb75ae2)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=63f2f9db0e87320242646ffcc18a32fd6699e7d7
---

 modules/audio_filter/resampler/soxr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 373f629106..5312ec4cc8 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -246,7 +246,11 @@ SoXR_Resample( filter_t *p_filter, soxr_t soxr, block_t *p_in, size_t i_olen )
         p_out = p_in;
     }
     else
+    {
         p_out = block_Alloc( i_olen * i_oframesize );
+        if( p_out == NULL )
+            goto error;
+    }
 
     soxr_error_t error = soxr_process( soxr, p_in ? p_in->p_buffer : NULL,
                                        i_ilen, &i_idone, p_out->p_buffer,



More information about the vlc-commits mailing list