[vlc-commits] soxr: add missing alloc check

Thomas Guillem git at videolan.org
Tue May 5 13:51:54 CEST 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May  4 14:36:50 2020 +0200| [99d117b40de69b721f57aeba77563c600fb75ae2] | committer: Thomas Guillem

soxr: add missing alloc check

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=99d117b40de69b721f57aeba77563c600fb75ae2
---

 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 1d08d8527f..757edd5d7e 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