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-10 08:50:11 +0300
committerAdam Langley <agl@google.com>2015-05-11 22:17:10 +0300
commit4a5982813f940a3b16479dfdaa402b9229d4e23d (patch)
tree15c35c78d91502f0113788cf25a9a069192659d3 /crypto/modes
parentbc1fde3206c836226ec196d7772847b84a2cefed (diff)
Fix asserts in CRYPTO_ctr128_encrypt_ctr32.
NULL in and out are legal in the degenerate case when len is 0. Change-Id: Ibf0600a4f635a03103b1ae914918fdcf23a75a39 Reviewed-on: https://boringssl-review.googlesource.com/4705 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 a5a35899..306b6f74 100644
--- a/crypto/modes/ctr.c
+++ b/crypto/modes/ctr.c
@@ -163,7 +163,8 @@ void CRYPTO_ctr128_encrypt_ctr32(const uint8_t *in, uint8_t *out,
unsigned int *num, ctr128_f func) {
unsigned int n, ctr32;
- assert(in && out && key && ecount_buf && num);
+ assert(key && ecount_buf && num);
+ assert(len == 0 || (in && out));
assert(*num < 16);
n = *num;