summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose dos Santos Junior <j.s.junior@live.com>2018-12-12 05:19:14 +0000
committerDmitry Bogatov <KAction@debian.org>2018-12-12 05:19:14 +0000
commitb179588dc075d421c3db3830a40397d66abf5524 (patch)
treea8c970b40321b55fff5617b8d207992a0471e1b5
parent8fcfd33df20a30465c7dc17f53d4be6d4d759493 (diff)
fix-nullpointer-dereferenceHEADarchive/debian/1.30-0.2master
Gbp-Pq: Name fix-nullpointer-dereference
-rw-r--r--mini_httpd.c3
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;