mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
^ is not a good way to check for all zeros :) Spotted by sneves@
This commit is contained in:
@@ -21,7 +21,7 @@ int crypto_sign_open(
|
||||
if (smlen < 64) return -1;
|
||||
if (sm[63] & 224) return -1;
|
||||
if (ge_frombytes_negate_vartime(&A,pk) != 0) return -1;
|
||||
for (i = 0; i < 32; ++i) d ^= pk[i];
|
||||
for (i = 0; i < 32; ++i) d |= pk[i];
|
||||
if (d == 0) return -1;
|
||||
|
||||
for (i = 0;i < smlen;++i) m[i] = sm[i];
|
||||
|
||||
Reference in New Issue
Block a user