From 6f1f694418c7effef13972ea135ce1c735042a8f Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 12 Jul 2021 15:11:32 +0200 Subject: [PATCH] libhashkit/aes: fix logic error in aes_initialize --- src/libhashkit/aes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libhashkit/aes.cc b/src/libhashkit/aes.cc index d65a9d91..e4ae96f8 100644 --- a/src/libhashkit/aes.cc +++ b/src/libhashkit/aes.cc @@ -30,7 +30,7 @@ bool aes_initialize(const unsigned char *key, const size_t key_length, encryption_context_t *crypto_context) { unsigned char aes_key[AES_KEY_NBYTES]; unsigned char aes_iv[AES_IV_NBYTES]; - if (aes_key == NULL || aes_iv == NULL) { + if (!key) { return false; } -- 2.30.2