Fixed svace for 40896 83/62583/1
authortaesubkim <taesub.kim@samsung.com>
Thu, 17 Mar 2016 00:59:46 +0000 (09:59 +0900)
committertaesubkim <taesub.kim@samsung.com>
Thu, 17 Mar 2016 00:59:56 +0000 (09:59 +0900)
Change-Id: I5a831fa553952eeb75a9824c3ad21f77fdac659d
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
daemon/src/vpn_service_daemon.c
packaging/dbus-vpnsvc-daemon.conf [changed mode: 0644->0755]

index b94d675..0a95595 100755 (executable)
@@ -272,12 +272,13 @@ static void connman_set_items(GDBusConnection *connection, char *profile,
        GVariant *params = NULL;
        char *strings = strdup(items);
        char *addr = NULL;
+       char *temp = NULL;
 
        builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
-       if ((addr = strtok(strings, ", ")) != NULL) {
+       if ((addr = strtok_r(strings, ", ", &temp)) != NULL) {
                do {
                        g_variant_builder_add(builder, "s", addr);
-               } while ((addr = strtok(NULL, ", ")) != NULL);
+               } while ((addr = strtok_r(NULL, ", ", &temp)) != NULL);
        }
        free(strings);
        params = g_variant_new("(sv)", keystr,
old mode 100644 (file)
new mode 100755 (executable)