mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix thread safety and zeroing method
This commit is contained in:
parent
2aa9db5a22
commit
db70a337ff
1 changed files with 2 additions and 2 deletions
|
@ -318,7 +318,7 @@ _destroyProv:
|
|||
*/
|
||||
char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
|
||||
{
|
||||
static char passwd[MD5_HASH_MAX_LEN], *p;
|
||||
ZEND_TLS char passwd[MD5_HASH_MAX_LEN], *p;
|
||||
const char *sp, *ep;
|
||||
unsigned char final[16];
|
||||
unsigned int i, sl, pwl;
|
||||
|
@ -418,7 +418,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
|
|||
*p = '\0';
|
||||
|
||||
/* Don't leave anything around in vm they could use. */
|
||||
memset(final, 0, sizeof(final));
|
||||
ZEND_SECURE_ZERO(final, sizeof(final));
|
||||
return (passwd);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue