Commit ab28b96b authored by Christophe Massiot's avatar Christophe Massiot

* src/misc/httpd.c: Do not dereference a possibly NULL pointer.

parent b601408c
...@@ -2166,7 +2166,8 @@ static void httpd_HostThread( httpd_host_t *host ) ...@@ -2166,7 +2166,8 @@ static void httpd_HostThread( httpd_host_t *host )
if( b64 ) auth = malloc( strlen(b64) + 1 ); if( b64 ) auth = malloc( strlen(b64) + 1 );
else auth = malloc( strlen("") + 1 ); else auth = malloc( strlen("") + 1 );
if( !strncasecmp( b64, "BASIC", 5 ) ) if( b64 != NULL
&& !strncasecmp( b64, "BASIC", 5 ) )
{ {
b64 += 5; b64 += 5;
while( *b64 == ' ' ) while( *b64 == ' ' )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment