Fix dereference null return value 61/270661/1
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 7 Feb 2022 10:36:04 +0000 (19:36 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 7 Feb 2022 10:36:04 +0000 (19:36 +0900)
Change-Id: I1b54ee88eb6d0ac536f5f11a6cd34fccd61296ea
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
packaging/capi-network-wifi-manager.spec
src/network_interface.c

index e05840f..ffb811f 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi-manager
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.3.16
+Version:       1.3.17
 Release:       0
 Group:         System/Network
 License:       Apache-2.0
index 1ef627f..f2c4e08 100644 (file)
@@ -939,8 +939,10 @@ static inline void _net_extract_winfo_ssid(GVariant *var, net_profile_info_s *Pr
        const gchar *ssid;
 
        ssid = g_variant_get_fixed_array(var, &ssid_len, sizeof(guchar));
-       memcpy(ProfInfo->raw_ssid, ssid, ssid_len);
-       ProfInfo->raw_ssid_len = ssid_len;
+       if (ssid) {
+               memcpy(ProfInfo->raw_ssid, ssid, ssid_len);
+               ProfInfo->raw_ssid_len = ssid_len;
+       }
 }
 
 static inline void _net_extract_winfo_vsie(GVariant *var, net_profile_info_s *ProfInfo)