]> git.sesse.net Git - vlc/commitdiff
Prevent potential null pointer dereference in zip access
authorGabriel de Perthuis <g2p.code@gmail.com>
Mon, 15 Sep 2014 10:35:46 +0000 (12:35 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 17 Sep 2014 06:53:03 +0000 (08:53 +0200)
Close #12149

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/access/zip/zipstream.c

index 61410cd64e1a0f7bb31818ca9c9892b922e2c30f..633b4417371dbdc80e194d34d82cec41c8b5ea0a 100644 (file)
@@ -713,7 +713,7 @@ static node* findOrCreateParentNode( node *root, const char *fullpath )
 
     while( current )
     {
-        if( !strcmp( current->name, folder ) )
+        if( current->name && !strcmp( current->name, folder ) )
         {
             /* We found the folder, go recursively deeper */
             node *parentNode = findOrCreateParentNode( current, sep );