[PATCH] shadow-4.0.8 crypt problem

Greg Schafer <[email protected]> Wed, 11 May 2005 10:03:11 +1000
Newsgroups gmane.linux.pld.shadow.general
Message-ID <[email protected]>
Hi

This release contains a tiny bug that causes `passwd' to segfault in my
non-PAM builds. I take no credit for finding the bug. I found the patch
here:

http://www.paldo.org/index.php?section=packages&page=main&releaseid=20289
http://www.paldo.org/paldo/sources/shadow/shadow-4.0.8-encrypt-1.patch.bz2

Please apply.

Thanks
Greg
shadow-4.0.8.patch (text/plain, 397 B)
diff -Naur shadow-4.0.8.orig/lib/encrypt.c shadow-4.0.8/lib/encrypt.c
--- shadow-4.0.8.orig/lib/encrypt.c	2005-04-06 12:59:22.000000000 +1000
+++ shadow-4.0.8/lib/encrypt.c	2005-05-11 09:54:34.000000000 +1000
@@ -40,7 +40,7 @@
 	static char cipher[128];
 	char *cp;
 
-	crypt (clear, salt);
+	cp = crypt (clear, salt);
 	if (!cp) {
 		/*
 		 * Single Unix Spec: crypt() may return a null pointer,