Use |kSizeTWithoutLower4Bits| in crypto/modes/gcm.c.
Some instances were missed in eca509c8daf998a6eb84f32a85c2f3137d692e55.
Change-Id: I53a6bd944fbf0df439b8e6f9db761f61d7237ba2
Reviewed-on: https://boringssl-review.googlesource.com/7103
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/crypto/modes/gcm.c b/crypto/modes/gcm.c
index 2519b19..8cc138d 100644
--- a/crypto/modes/gcm.c
+++ b/crypto/modes/gcm.c
@@ -606,7 +606,8 @@
}
#ifdef GHASH
- if ((i = (len & (size_t) - 16))) {
+ i = len & kSizeTWithoutLower4Bits;
+ if (i != 0) {
GHASH(ctx, aad, i);
aad += i;
len -= i;
@@ -895,7 +896,8 @@
}
len -= GHASH_CHUNK;
}
- if ((i = (len & (size_t) - 16))) {
+ i = len & kSizeTWithoutLower4Bits;
+ if (i != 0) {
GHASH(ctx, in, i);
while (len >= 16) {
size_t *out_t = (size_t *)out;