Fix definition of length of pkg path 29/235029/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 2 Jun 2020 01:09:05 +0000 (10:09 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 2 Jun 2020 01:09:05 +0000 (10:09 +0900)
Change-Id: I01afa342c3b1867268269d02767584b412803da2
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/pkg_cmd.c

index 21d23b9..b113333 100644 (file)
@@ -306,8 +306,8 @@ static int __convert_to_absolute_path(pm_tool_args *data)
                printf("realpath fail: %d\n", errno);
                return -1;
        }
-       ret = snprintf(data->pkg_path, PKG_NAME_STRING_LEN_MAX - 1, "%s", abs);
-       if (ret < 0 || ret > PKG_NAME_STRING_LEN_MAX - 1) {
+       ret = snprintf(data->pkg_path, PATH_MAX - 1, "%s", abs);
+       if (ret < 0 || ret > PATH_MAX - 1) {
                printf("snprintf fail\n");
                return -1;
        }