void-packages/srcpkgs/php/patches/php-705-crypt.patch

21 lines
540 B
Diff

--- ext/standard/crypt.c.orig 2016-03-29 16:44:22.000000000 +0200
+++ ext/standard/crypt.c 2016-04-12 18:15:09.987505656 +0200
@@ -270,6 +270,17 @@
return result;
}
}
+# 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
#endif
}