[Lux US STA] Fix Svace issue : 163559 38/180838/1 accepted/tizen/4.0/unified/20180605.090423 submit/tizen_4.0/20180604.235903
authorJihoon Jung <jh8801.jung@samsung.com>
Mon, 4 Jun 2018 23:07:42 +0000 (08:07 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Mon, 4 Jun 2018 23:09:15 +0000 (08:09 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: I7c76b88cbf5bc0b2c06aa04fb0a98d0242a946ec

packaging/mtp-responder.spec
src/mtp_init.c

index 2e4426f..2eac96e 100755 (executable)
@@ -6,7 +6,7 @@ ExcludeArch: %arm aarch64
 Name:       mtp-responder
 Summary:    Media Transfer Protocol daemon (responder)
 Version:    0.0.27
-Release:    2
+Release:    3
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index 80a6a88..e1dfbd5 100755 (executable)
@@ -320,66 +320,114 @@ static void __read_mtp_conf(void)
 
                if (strcasecmp(token, "mmap_threshold") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.mmap_threshold = atoi(token);
 
                } else if (strcasecmp(token, "init_rx_ipc_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.init_rx_ipc_size = atoi(token);
 
                } else if (strcasecmp(token, "init_tx_ipc_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.init_tx_ipc_size = atoi(token);
 
                } else if (strcasecmp(token, "max_rx_ipc_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.max_rx_ipc_size = atoi(token);
 
                } else if (strcasecmp(token, "max_tx_ipc_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.max_tx_ipc_size = atoi(token);
 
                } else if (strcasecmp(token, "read_usb_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.read_usb_size = atoi(token);
 
                } else if (strcasecmp(token, "write_usb_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.write_usb_size = atoi(token);
 
                } else if (strcasecmp(token, "read_file_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.read_file_size = atoi(token);
 
                } else if (strcasecmp(token, "write_file_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.write_file_size = atoi(token);
 
                } else if (strcasecmp(token, "max_io_buf_size") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.max_io_buf_size = atoi(token);
 
                } else if (strcasecmp(token, "read_file_delay") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.read_file_delay = atoi(token);
 
                } else if (strcasecmp(token, "support_pthread_sched") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.support_pthread_sched = atoi(token) ? true : false;
 
                } else if (strcasecmp(token, "inheritsched") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.inheritsched = *token;
 
                } else if (strcasecmp(token, "schedpolicy") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.schedpolicy = *token;
 
                } else if (strcasecmp(token, "file_schedparam") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.file_schedparam = atoi(token);
 
                } else if (strcasecmp(token, "usb_schedparam") == 0) {
                        token = strtok_r(NULL, "=", &saveptr);
+                       if (token == NULL)
+                               continue;
+
                        g_conf.usb_schedparam = atoi(token);
 
                } else {