--- ext/standard/crypt.c.orig	2016-04-28 14:13:00.000000000 -0400
+++ ext/standard/crypt.c	2016-04-28 21:45:24.340955313 -0400
@@ -267,6 +267,12 @@
 	}
 # elif defined(HAVE_CRYPT)
 	crypt_res = crypt(password, salt);
+	if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
+		return NULL;
+	} else {
+		result = zend_string_init(crypt_res, strlen(crypt_res), 0);
+		return result;
+	}
 # else
 #  error No crypt() implementation
 # endif
