summaryrefslogtreecommitdiff
path: root/ext/hash/hash_snefru.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/hash/hash_snefru.c')
-rw-r--r--ext/hash/hash_snefru.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c
index 2cf37998ad..c35fee3c29 100644
--- a/ext/hash/hash_snefru.c
+++ b/ext/hash/hash_snefru.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -166,7 +166,7 @@ PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *context, const unsigned char
}
memcpy(context->buffer, input + i, r);
- memset(&context->buffer[r], 0, 32 - r);
+ ZEND_SECURE_ZERO(&context->buffer[r], 32 - r);
context->length = r;
}
}
@@ -190,7 +190,7 @@ PHP_HASH_API void PHP_SNEFRUFinal(unsigned char digest[32], PHP_SNEFRU_CTX *cont
digest[j + 3] = (unsigned char) (context->state[i] & 0xff);
}
- memset(context, 0, sizeof(*context));
+ ZEND_SECURE_ZERO(context, sizeof(*context));
}
const php_hash_ops php_hash_snefru_ops = {