[vlc-devel] [PATCH 1/2] input: Fix potential use of an uninitialized pointer

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Dec 3 20:19:18 CET 2020


---
 src/input/input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 5294603e0d..81cd932731 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1179,6 +1179,8 @@ static void InitPrograms( input_thread_t * p_input )
     int i_es_out_mode;
     int *tab;
     size_t count;
+	
+    TAB_INIT(count, tab);
 
     /* Compute correct pts_delay */
     UpdatePtsDelay( p_input );
@@ -1193,7 +1195,6 @@ static void InitPrograms( input_thread_t * p_input )
         {
             char *buf;
 
-            TAB_INIT(count, tab);
             for( const char *prgm = strtok_r( prgms, ",", &buf );
                  prgm != NULL;
                  prgm = strtok_r( NULL, ",", &buf ) )
-- 
2.29.2



More information about the vlc-devel mailing list