Fix some svace 86/74486/2
authorhyunuktak <hyunuk.tak@samsung.com>
Tue, 14 Jun 2016 10:16:43 +0000 (19:16 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 15 Jun 2016 01:11:32 +0000 (10:11 +0900)
Change-Id: I501fafa24e7d7b39bd36ec684c9bf27d1d094130
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/net-config.spec
src/wifi-config.c
src/wifi-eap-config.c

index 3367a2aa5bd9e712102c0e08359e5356e40f26c7..2b7b7e2ca1b31685f0d1bf7bb71916c4728ac0f2 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
-Version:       1.1.74
+Version:       1.1.75
 Release:       2
 Group:         System/Network
 License:       Apache-2.0
index 1824ef2a5b660265ea32fa19d7a46aaff7d4b61e..216d5b3384ad7e882641035ccbbca12a1172eb51 100755 (executable)
@@ -139,7 +139,7 @@ static gboolean __get_mac_address(gchar **mac_address)
 #endif
        tmp = g_ascii_strdown(tmp_mac, (gssize)strlen(tmp_mac));
        g_free(tmp_mac);
-       while (tmp[i]) {
+       while (tmp && tmp[i]) {
                if (tmp[i] != ':')
                        mac[j++] = tmp[i];
                i++;
index 42a63294f819cae9a6f078f9e317ab3b87386771..49283ba6ef719963f3f9067e0c2fc6e4189375fa 100755 (executable)
@@ -94,7 +94,7 @@ static int __config_save(const char *ssid, GKeyFile *keyfile)
 
        /* Do POSIX file operation to create and remove config files,
         * Do not use g_file_set_contents, it breaks inotify operations */
-       if (fputs(data, file) < 0) {
+       if (data && fputs(data, file) < 0) {
                ERR("Failed to write %s", config_file);
 
                err = -EIO;