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
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-05-12 06:26:40 +0300
committerAdam Langley <agl@google.com>2015-05-12 22:26:53 +0300
commit5694b3a84b16e7a065566816da51e056246d98e6 (patch)
tree34f299606ba940bec34a616ccd7f36b25dc8010c /crypto/modes
parent9b68e72d181430fcccaba03a7507bcdc935ac764 (diff)
Fix invalid assert in CRYPTO_ctr128_encrypt.
As with CRYPTO_ctr128_encrypt_ctr32, NULL in and out are legal in the degenerate case when len is 0. This fixes one of the two failures on the bots. Change-Id: If6016dfc3963d9c06c849fc8eba9908556f66666 Reviewed-on: https://boringssl-review.googlesource.com/4721 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/modes')
-rw-r--r--crypto/modes/ctr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/modes/ctr.c b/crypto/modes/ctr.c
index 306b6f74..64062b27 100644
--- a/crypto/modes/ctr.c
+++ b/crypto/modes/ctr.c
@@ -88,7 +88,8 @@ void CRYPTO_ctr128_encrypt(const uint8_t *in, uint8_t *out, size_t len,
block128_f block) {
unsigned int n;
- assert(in && out && key && ecount_buf && num);
+ assert(key && ecount_buf && num);
+ assert(len == 0 || (in && out));
assert(*num < 16);
assert((16 % sizeof(size_t)) == 0);