misc: avoid potential buffer overflow 42/128442/1
authorJinhyung Choi <jinh0.choi@samsung.com>
Thu, 20 Apr 2017 06:08:44 +0000 (15:08 +0900)
committerJinhyung Choi <jinh0.choi@samsung.com>
Wed, 10 May 2017 05:04:09 +0000 (14:04 +0900)
Change-Id: Ib87bfb9ee6a3f1a0b3b3cd3d65f460e0ceea3338
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
(cherry picked from commit efe0ed6319e6f273dd78aadcac445a99524691ba)

src/sdktools.c

index ac7d21e..755625a 100644 (file)
@@ -90,7 +90,7 @@ static int get_application_install_path(char* pkg_path) {
     while(ret_str[--len]=='\n');
     ret_str[len + 1] = '\0';
 
-    if (sscanf(ret_str, "Tizen Application Installation Path: %s", pkg_path) != 1) {
+    if (sscanf(ret_str, "Tizen Application Installation Path: %4095s", pkg_path) != 1) {
         D("failed : parsing fail (str:%s)\n", ret_str);
         return 0;
     }