From 923d98fcda7010d0c7ad4d9e3fb0a02e3bd82081 Mon Sep 17 00:00:00 2001 From: taesubkim Date: Thu, 17 Mar 2016 09:59:46 +0900 Subject: [PATCH] Fixed svace for 40896 Change-Id: I5a831fa553952eeb75a9824c3ad21f77fdac659d Signed-off-by: Taesub Kim --- daemon/src/vpn_service_daemon.c | 5 +++-- packaging/dbus-vpnsvc-daemon.conf | 0 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 packaging/dbus-vpnsvc-daemon.conf diff --git a/daemon/src/vpn_service_daemon.c b/daemon/src/vpn_service_daemon.c index b94d675..0a95595 100755 --- a/daemon/src/vpn_service_daemon.c +++ b/daemon/src/vpn_service_daemon.c @@ -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, diff --git a/packaging/dbus-vpnsvc-daemon.conf b/packaging/dbus-vpnsvc-daemon.conf old mode 100644 new mode 100755 -- 2.7.4