libhashkit/aes: fix logic error in aes_initialize
authorMichael Wallner <mike@php.net>
Mon, 12 Jul 2021 13:11:32 +0000 (15:11 +0200)
committerMichael Wallner <mike@php.net>
Mon, 12 Jul 2021 14:00:53 +0000 (16:00 +0200)
src/libhashkit/aes.cc

index d65a9d914666ef3adb4acfd24ea9c5ec2d56d527..e4ae96f812ae4d1971fa64a3a4b2fff102554441 100644 (file)
@@ -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;
   }