summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2019-01-07 20:35:25 +0000
committerDmitry Bogatov <KAction@debian.org>2019-01-07 20:35:25 +0000
commit40938dc008c945c1df1aa7261240de72240073c6 (patch)
tree618fc93df6b2427875a21b08463044c1ecc3c4f4
parent2b58a6e1c105a9c4135b505c1edc965cb04073e0 (diff)
Fix segfault in checkpassword
Forwarded: not-needed Last-Update: 2019-01-07 Implicit declaration of crypt() due missing include of <crypt.h> caused pointer value, returned by crypt() to be mangled and invalid memory accessed. Last-Update: 2019-01-07 Gbp-Pq: Name fix-checkpassword-crash.patch
-rw-r--r--checkpassword.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/checkpassword.c b/checkpassword.c
index edb7ce0..3b19f9e 100644
--- a/checkpassword.c
+++ b/checkpassword.c
@@ -1,9 +1,13 @@
+#define _DEFAULT_SOURCE
#define _XOPEN_SOURCE
#include <string.h>
#include <unistd.h>
#include <pwd.h>
#include <shadow.h>
#include <stdio.h>
+#include <sys/types.h>
+#include <crypt.h>
+#include <grp.h>
#include <alloca.h>
#ifdef __dietlibc__
#include <write12.h>