Use |kSizeTWithoutLower4Bits| in crypto/modes/gcm.c.

Some instances were missed in eca509c8da.

Change-Id: I53a6bd944fbf0df439b8e6f9db761f61d7237ba2
Reviewed-on: https://boringssl-review.googlesource.com/7103
Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
Brian Smith 2016-02-07 11:25:23 -10:00 committed by David Benjamin
parent 5ba06897be
commit 11676a7399

View File

@ -606,7 +606,8 @@ int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const uint8_t *aad, size_t len) {
}
#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 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, const void *key,
}
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;