aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/whrlpool/wp_dgst.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/whrlpool/wp_dgst.c')
-rw-r--r--crypto/whrlpool/wp_dgst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/whrlpool/wp_dgst.c b/crypto/whrlpool/wp_dgst.c
index 807d1c49b2d3..96d042f5859e 100644
--- a/crypto/whrlpool/wp_dgst.c
+++ b/crypto/whrlpool/wp_dgst.c
@@ -166,7 +166,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
goto reconsider;
} else
#endif
- if (bits >= 8) {
+ if (bits > 8) {
b = ((inp[0] << inpgap) | (inp[1] >> (8 - inpgap)));
b &= 0xff;
if (bitrem)
@@ -183,7 +183,7 @@ void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
}
if (bitrem)
c->data[byteoff] = b << (8 - bitrem);
- } else { /* remaining less than 8 bits */
+ } else { /* remaining less than or equal to 8 bits */
b = (inp[0] << inpgap) & 0xff;
if (bitrem)