Codebase list faad2 / 4a57649 debian / patches / 0002-Reject-buffers-of-zero-size.patch
4a57649

Tree @4a57649 (Download .tar.gz)

0002-Reject-buffers-of-zero-size.patch @4a57649raw · history · blame

From a65ecabd13a6b991781d75856e1b6870ce00fc70 Mon Sep 17 00:00:00 2001
From: David Korczynski <david@adalogics.com>
Date: Thu, 15 Jul 2021 20:49:44 +0100
Subject: [PATCH 2/2] Reject buffers of zero size

---
 libfaad/decoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libfaad/decoder.c b/libfaad/decoder.c
index c3bbf4c..132cdd8 100644
--- a/libfaad/decoder.c
+++ b/libfaad/decoder.c
@@ -271,7 +271,7 @@ long NeAACDecInit(NeAACDecHandle hpDecoder,
     NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder;
 
 
-    if ((hDecoder == NULL) || (samplerate == NULL) || (channels == NULL))
+    if ((hDecoder == NULL) || (samplerate == NULL) || (channels == NULL) || (buffer_size == 0))
         return -1;
 
     hDecoder->sf_index = get_sr_index(hDecoder->config.defSampleRate);
-- 
2.33.0