1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Dmitry Bogatov <KAction@debian.org>
Date: Sun, 12 May 2019 05:32:28 +0000
Subject: Fix segfault in checkpassword
Implicit declaration of crypt() due missing include of <crypt.h> caused
pointer value, returned by crypt() to be mangled and invalid memory
accessed.
---
checkpassword.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/checkpassword.c b/checkpassword.c
index b7bbe85..ef1452f 100644
--- a/checkpassword.c
+++ b/checkpassword.c
@@ -3,6 +3,10 @@
#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>
#else
|