From 4ac7e0127bc9ee267835430b26bfd887cf386e26 Mon Sep 17 00:00:00 2001 From: Jinhyung Choi Date: Thu, 20 Apr 2017 15:08:44 +0900 Subject: [PATCH] misc: avoid potential buffer overflow Change-Id: Ib87bfb9ee6a3f1a0b3b3cd3d65f460e0ceea3338 Signed-off-by: Jinhyung Choi (cherry picked from commit efe0ed6319e6f273dd78aadcac445a99524691ba) --- src/sdktools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdktools.c b/src/sdktools.c index ac7d21e..755625a 100644 --- a/src/sdktools.c +++ b/src/sdktools.c @@ -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; } -- 2.34.1