[vlc-commits] input: Fix potential use of an uninitialized pointer

Hugo Beauzée-Luyssen git at videolan.org
Fri Dec 4 09:30:38 UTC 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Nov 27 08:11:36 2020 -0800| [a7c322902c667a483cfefc556fcc30f3d4d0d8c6] | committer: Hugo Beauzée-Luyssen

input: Fix potential use of an uninitialized pointer

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

 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..dafead8408 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1180,6 +1180,8 @@ static void InitPrograms( input_thread_t * p_input )
     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 ) )



More information about the vlc-commits mailing list