From a1c5e47af37f5321b1dae6dfc4c26e6cfc7ccb5b Mon Sep 17 00:00:00 2001 From: Jaehyun Kim Date: Tue, 24 Sep 2024 12:35:32 +0900 Subject: [PATCH] Check if ckmc_get_data() provides NULL value There are cases where ckmc_get_data() provides NULL value due to a DB issue used by key-manager. Code has been added to check for this situation. Change-Id: Ic79efcc26efa33251771bf7757ddda5ef600f895 Signed-off-by: Jaehyun Kim --- src/wifi-key-encryption.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wifi-key-encryption.c b/src/wifi-key-encryption.c index 33c8f5a..2177985 100755 --- a/src/wifi-key-encryption.c +++ b/src/wifi-key-encryption.c @@ -127,6 +127,9 @@ static void* __netconfig_set_param_list_aes_gcm(ckmc_param_list_h param) err = ckmc_get_data(IV_ALIAS, NULL, &iv_buf); + if (iv_buf == NULL) + DBG("iv_buf is null"); + if (err == CKMC_ERROR_DB_ALIAS_UNKNOWN) { ckmc_policy_s policy; policy.extractable = true; -- 2.34.1