diff options
Diffstat (limited to 'ext/standard/php_crypt_r.c')
-rw-r--r-- | ext/standard/php_crypt_r.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index a049bdae70..a3d0242e21 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -1,9 +1,9 @@ /* $Id$ */ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -62,7 +62,7 @@ MUTEX_T php_crypt_extended_init_lock; #if 0 CONDITION_VARIABLE initialized; #endif - + void php_init_crypt_r() { #ifdef ZTS @@ -206,7 +206,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { } /* Don't leave anything around in vm they could use. */ - memset(final, 0, sizeof(final)); + ZEND_SECURE_ZERO(final, sizeof(final)); /* Then something really weird... */ for (i = pwl; i != 0; i >>= 1) { @@ -288,13 +288,13 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { *p = '\0'; - memset(final, 0, sizeof(final)); + ZEND_SECURE_ZERO(final, sizeof(final)); _destroyCtx1: if (ctx1) { if (!CryptDestroyHash(ctx1)) { - + } } @@ -325,9 +325,9 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) PHP_MD5_CTX ctx, ctx1; php_uint32 l; int pl; - + pwl = strlen(pw); - + /* Refine the salt first */ sp = salt; |