File php5-5.3.5-CVE-2012-2143.patch of Package php5

Index: ext/standard/crypt_freesec.c
===================================================================
--- ext/standard/crypt_freesec.c.orig
+++ ext/standard/crypt_freesec.c
@@ -629,7 +629,8 @@ _crypt_extended_r(const char *key, const
 	 */
 	q = (u_char *) keybuf;
 	while (q - (u_char *) keybuf < sizeof(keybuf)) {
-		if ((*q++ = *key << 1))
+               *q++ = *key << 1;
+               if (*key)
 			key++;
 	}
 	if (des_setkey((u_char *) keybuf, data))
openSUSE Build Service is sponsored by