From: Darren Tucker Date: Fri, 19 Jun 2020 09:10:47 +0000 (+1000) Subject: Extra brackets around sizeof() in bcrypt. X-Git-Tag: V_8_4_P1~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1babb8bb14c423011ca34c2f563bb1c51c8fbf1d;p=thirdparty%2Fopenssh-portable.git 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 --- diff --git a/openbsd-compat/bcrypt_pbkdf.c b/openbsd-compat/bcrypt_pbkdf.c index 785234563..36d5d085c 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++) {