From 143da9090cc1595c7786239b9737cbfae7277b44 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 25 Oct 2019 16:46:48 +0900 Subject: [PATCH] Fix crash when creating delta pkg Change-Id: I91269b04a76b4b9e23fbac123514a44135bc5985 Signed-off-by: Sangyoon Jang --- src/pkg_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg_cmd.c b/src/pkg_cmd.c index e710f8a..e7e70ff 100644 --- a/src/pkg_cmd.c +++ b/src/pkg_cmd.c @@ -1298,7 +1298,7 @@ static int __create_delta_dispatcher(uid_t target_uid) return -1; } if (data.delta_pkg[0] == '\0') { - snprintf(data.resolved_path_delta_pkg, PATH_MAX, "/tmp/delta_pkg"); + data.resolved_path_delta_pkg = strdup("/tmp/delta_pkg"); printf("output file will be /tmp/delta_pkg.delta\n"); } const char *unzip_argv[] = {"sh", -- 2.7.4