From dbdf3b96c31bf71337f134a0bec790877c323a89 Mon Sep 17 00:00:00 2001 From: Jihoon Chung Date: Thu, 25 Apr 2013 20:41:37 +0900 Subject: [PATCH] Fixed lock-up issue when input argument is wrong with -c command [Issue#] N/A [Problem] If arguments for "-c" is wrong, wrt-installer doesn't exit [Cause] During parsing command, wrt-installer cannot get out from while loop [Solution] Add condition for argument is wrong case [SCMRequest] N/A Change-Id: Id506bbce99f5559bdc3d5f08716eec304287a6e5 --- src/wrt-installer/wrt-installer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wrt-installer/wrt-installer.cpp b/src/wrt-installer/wrt-installer.cpp index a61a96a..58db8f4 100644 --- a/src/wrt-installer/wrt-installer.cpp +++ b/src/wrt-installer/wrt-installer.cpp @@ -1001,14 +1001,14 @@ CSCConfiguration::dataMap WrtInstaller::parseCSCConfiguration( const char* ptr = strtok(buf,":"); while (ptr != NULL) { std::string string = ptr; + ptr = strtok (NULL, ":"); size_t pos = string.find('='); if (pos == std::string::npos) { continue; } result.insert( CSCConfiguration::dataPair(string.substr(0, pos), - string.substr(pos+1))); - ptr = strtok (NULL, ":"); + string.substr(pos+1))); } return result; } -- 2.7.4