summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2018-12-12 05:09:21 +0000
committerDmitry Bogatov <KAction@debian.org>2018-12-12 05:09:47 +0000
commita6482f8e33f880e39065d74bc539e846137a8f47 (patch)
treed49fe1b2a6d573c0a1d442f04c09cdb5aa38dd32 /debian/patches
parent40915138278daeca3f93d9b8c0399e2e52d8f2f0 (diff)
Fix null pointer dereference (Closes: #916190)
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/fix-nullpointer-dereference18
-rw-r--r--debian/patches/series1
2 files changed, 19 insertions, 0 deletions
diff --git a/debian/patches/fix-nullpointer-dereference b/debian/patches/fix-nullpointer-dereference
new file mode 100644
index 0000000..2e4fdf8
--- /dev/null
+++ b/debian/patches/fix-nullpointer-dereference
@@ -0,0 +1,18 @@
+---
+ mini_httpd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/mini_httpd.c b/mini_httpd.c
+index 03d0cdd..77f030f 100644
+--- a/mini_httpd.c
++++ b/mini_httpd.c
+@@ -2404,7 +2404,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;
diff --git a/debian/patches/series b/debian/patches/series
index 7dfdbf3..1356142 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ fix-change-index-document-root
fix-makefile
05-manpage-hyphen
fix-ftbfs-kfreebsd-amd64
+fix-nullpointer-dereference