mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
is_zero(): volatilize the accumulator
This commit is contained in:
@@ -184,8 +184,8 @@ sodium_compare(const unsigned char *b1_, const unsigned char *b2_, size_t len)
|
||||
int
|
||||
sodium_is_zero(const unsigned char *n, const size_t nlen)
|
||||
{
|
||||
size_t i;
|
||||
unsigned char d = 0U;
|
||||
size_t i;
|
||||
volatile unsigned char d = 0U;
|
||||
|
||||
for (i = 0U; i < nlen; i++) {
|
||||
d |= n[i];
|
||||
|
||||
Reference in New Issue
Block a user