[openssh-commits] [openssh] 01/01: Extra brackets around sizeof() in bcrypt.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Jun 19 19:13:30 AEST 2020
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 1babb8bb14c423011ca34c2f563bb1c51c8fbf1d
Author: Darren Tucker <dtucker at dtucker.net>
Date: Fri Jun 19 19:10:47 2020 +1000
Extra brackets around sizeof() in bcrypt.
Prevents following warning from clang 10:
bcrypt_pbkdf.c:94:40: error: expression does not compute the number of
elements in this array; element type is ´uint32_tÂ[...]
place parentheses around the ´sizeof(uint64_t)´ expression to
silence this warning
---
openbsd-compat/bcrypt_pbkdf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openbsd-compat/bcrypt_pbkdf.c b/openbsd-compat/bcrypt_pbkdf.c
index 78523456..36d5d085 100644
--- a/openbsd-compat/bcrypt_pbkdf.c
+++ b/openbsd-compat/bcrypt_pbkdf.c
@@ -91,7 +91,7 @@ bcrypt_hash(u_int8_t *sha2pass, u_int8_t *sha2salt, u_int8_t *out)
cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext),
&j);
for (i = 0; i < 64; i++)
- blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint64_t));
+ blf_enc(&state, cdata, sizeof(cdata) / (sizeof(uint64_t)));
/* copy out */
for (i = 0; i < BCRYPT_WORDS; i++) {
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list