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);