Skip to content

Commit bf0f532

Browse files
committed
Securely zero the hash context key
1 parent 368958b commit bf0f532

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/hash/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static void php_hash_dtor(zend_resource *rsrc) /* {{{ */
783783
}
784784

785785
if (hash->key) {
786-
memset(hash->key, 0, hash->ops->block_size);
786+
ZEND_SECURE_ZERO(hash->key, hash->ops->block_size);
787787
efree(hash->key);
788788
}
789789
efree(hash);

0 commit comments

Comments
 (0)