diff options
Diffstat (limited to 'mini_httpd.c')
-rw-r--r-- | mini_httpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mini_httpd.c b/mini_httpd.c index 762ca6c..b9c5c27 100644 --- a/mini_httpd.c +++ b/mini_httpd.c @@ -2407,7 +2407,8 @@ auth_check( char* dirname ) /* Yes. */ (void) fclose( fp ); /* So is the password right? */ - if ( strcmp( crypt( authpass, cryp ), cryp ) == 0 ) + char *cryptpass = crypt( authpass, cryp ); + if ((cryptpass != NULL) && (strcmp(cryptpass, cryp ) == 0) ) { /* Ok! */ remoteuser = line; |