summaryrefslogtreecommitdiff
path: root/ext/standard/crypt.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-07-15 15:50:42 +0400
committerDmitry Stogov <dmitry@zend.com>2014-07-15 15:50:42 +0400
commitb4c2bd227743e4ab9d47bf624911b230b3237b51 (patch)
tree2fc9d41f122c01bbc397128fd8bd65bf5c2e12bf /ext/standard/crypt.c
parentbcc677789c1832916af77994059873a30d145a72 (diff)
downloadphp-git-b4c2bd227743e4ab9d47bf624911b230b3237b51.tar.gz
Fixed compilation on Windows
Diffstat (limited to 'ext/standard/crypt.c')
-rw-r--r--ext/standard/crypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index f7696cf551..2a2304be20 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -260,9 +260,10 @@ PHP_FUNCTION(crypt)
char salt[PHP_MAX_SALT_LEN + 1];
char *str, *salt_in = NULL;
int str_len, salt_in_len = 0;
- salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
zend_string *result;
+ salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
+
/* This will produce suitable results if people depend on DES-encryption
* available (passing always 2-character salt). At least for glibc6.1 */
memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);