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;