Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2016-02-08 00:25:23 +0300
committerDavid Benjamin <davidben@google.com>2016-02-12 01:08:42 +0300
commit11676a7399555d7ab3e421b19e9016d170d639e0 (patch)
tree74e1f2246d5b97228c9b45d7cf5caa43547dc210 /crypto
parent5ba06897be4fb001113f6e8ea2398538dbbb88f2 (diff)
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>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/modes/gcm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/modes/gcm.c b/crypto/modes/gcm.c
index 2519b19f..8cc138dc 100644
--- a/crypto/modes/gcm.c
+++ b/crypto/modes/gcm.c
@@ -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;