]> git.sesse.net Git - vlc/commitdiff
* src/misc/httpd.c: Do not dereference a possibly NULL pointer.
authorChristophe Massiot <massiot@videolan.org>
Wed, 5 Apr 2006 17:17:22 +0000 (17:17 +0000)
committerChristophe Massiot <massiot@videolan.org>
Wed, 5 Apr 2006 17:17:22 +0000 (17:17 +0000)
src/network/httpd.c

index 3da773172e5c38c7af7aee278d7ceb41c13f5618..56b1b26d6dd466bc56762bdf3beeb2d54e77309d 100644 (file)
@@ -2166,7 +2166,8 @@ static void httpd_HostThread( httpd_host_t *host )
                                     if( b64 ) auth = malloc( strlen(b64) + 1 );
                                     else auth = malloc( strlen("") + 1 );
 
-                                    if( !strncasecmp( b64, "BASIC", 5 ) )
+                                    if( b64 != NULL
+                                         && !strncasecmp( b64, "BASIC", 5 ) )
                                     {
                                         b64 += 5;
                                         while( *b64 == ' ' )