diff options
author | Anatol Belski <ab@php.net> | 2014-09-18 22:02:04 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-19 00:06:34 +0200 |
commit | 2b77a57d884fab11dd54da0d78cb16a0496e76b4 (patch) | |
tree | 5e5f3888115014946fe0ed3c385feac65fc78439 /ext | |
parent | 3fa506417329c93ed47c1e79a03335b54d6838b6 (diff) | |
download | php-git-2b77a57d884fab11dd54da0d78cb16a0496e76b4.tar.gz |
zero sensitive data more secure way
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/crypt.c | 4 |
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 { |