]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Extra brackets around sizeof() in bcrypt.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 19 Jun 2020 09:10:47 +0000 (19:10 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 19 Jun 2020 09:10:47 +0000 (19:10 +1000)
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

index 78523456387ae38346577ed97747db59cace8153..36d5d085c7124ac4a5f767df408faaffb2893701 100644 (file)
@@ -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++) {