Check if ckmc_get_data() provides NULL value 38/318038/2 accepted/tizen_unified_toolchain accepted/tizen/9.0/unified/20241030.233947 accepted/tizen/unified/20240930.043759 accepted/tizen/unified/toolchain/20241004.101318 accepted/tizen/unified/x/20240930.091218 accepted/tizen/unified/x/asan/20241013.235626 tizen_9.0_m2_release
authorJaehyun Kim <jeik01.kim@samsung.com>
Tue, 24 Sep 2024 03:35:32 +0000 (12:35 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Wed, 25 Sep 2024 02:24:24 +0000 (11:24 +0900)
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 <jeik01.kim@samsung.com>
src/wifi-key-encryption.c

index 33c8f5a5eba253148f838bd102703ada29f71105..2177985c17357f71d9a0d93ade88b6cab9016c16 100755 (executable)
@@ -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;