]> git.pld-linux.org Git - packages/php.git/blame - php-crypt-null.patch
update backport patch to 20130717, include it in release number
[packages/php.git] / php-crypt-null.patch
CommitLineData
505c9c7d
AM
1--- php-5.2.17/ext/standard/crypt.c~ 2013-03-25 17:26:27.000000000 +0100
2+++ php-5.2.17/ext/standard/crypt.c 2013-03-25 17:27:42.866436012 +0100
91b7596e
AM
3@@ -118,6 +118,7 @@
4 Encrypt a string */
5 PHP_FUNCTION(crypt)
6 {
7+ char *crypt_res;
8 char salt[PHP_MAX_SALT_LEN+1];
9 char *str, *salt_in = NULL;
10 int str_len, salt_in_len;
505c9c7d
AM
11@@ -163,7 +163,12 @@
12 RETURN_STRING(crypt_r(str, salt, &buffer), 1);
13 }
14 #else
15- RETURN_STRING(crypt(str, salt), 1);
16+ crypt_res = crypt(str, salt);
17+ if (!crypt_res) {
18+ RETURN_FALSE;
19+ } else {
20+ RETURN_STRING(crypt_res, 1);
21+ }
22 #endif
23 }
24 /* }}} */
This page took 0.539389 seconds and 4 git commands to generate.