summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-09-18 22:02:04 +0200
committerAnatol Belski <ab@php.net>2014-09-19 00:06:34 +0200
commit2b77a57d884fab11dd54da0d78cb16a0496e76b4 (patch)
tree5e5f3888115014946fe0ed3c385feac65fc78439 /ext
parent3fa506417329c93ed47c1e79a03335b54d6838b6 (diff)
downloadphp-git-2b77a57d884fab11dd54da0d78cb16a0496e76b4.tar.gz
zero sensitive data more secure way
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/crypt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 1a9acf5bd6..b2524a0767 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -211,7 +211,11 @@ PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const ch
return NULL;
} else {
result = zend_string_init(output, strlen(output), 0);
+#ifdef PHP_WIN32
+ RtlSecureZeroMemory(output, PHP_MAX_SALT_LEN + 1);
+#else
memset(output, 0, PHP_MAX_SALT_LEN + 1);
+#endif
return result;
}
} else {