From dc66a38e7f4e0d85d73e473655a22305ae138baf Mon Sep 17 00:00:00 2001 From: Chia-Che Tsai Date: Tue, 23 Aug 2016 15:28:22 -0400 Subject: [PATCH] bugfix: unnormalized manifest paths cause regression test failed --- Pal/src/host/FreeBSD/db_main.c | 2 +- Pal/src/host/Linux/db_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Pal/src/host/FreeBSD/db_main.c b/Pal/src/host/FreeBSD/db_main.c index 989c3478..b782c0eb 100644 --- a/Pal/src/host/FreeBSD/db_main.c +++ b/Pal/src/host/FreeBSD/db_main.c @@ -291,7 +291,7 @@ void pal_bsd_main (void * args) file->__in.flags |= RFD(0)|WFD(0)|WRITEABLE(0); file->file.fd = fd; char * path = (void *) file + HANDLE_SIZE(file); - memcpy(path, argv[0], len + 1); + get_norm_path(argv[0], path, 0, len + 1); file->file.realpath = path; if (!check_elf_object(file)) { diff --git a/Pal/src/host/Linux/db_main.c b/Pal/src/host/Linux/db_main.c index d822cb66..9345203a 100644 --- a/Pal/src/host/Linux/db_main.c +++ b/Pal/src/host/Linux/db_main.c @@ -263,7 +263,7 @@ void pal_linux_main (void * args) HANDLE_HDR(file)->flags |= RFD(0)|WFD(0)|WRITEABLE(0); file->file.fd = fd; char * path = (void *) file + HANDLE_SIZE(file); - memcpy(path, argv[0], len + 1); + get_norm_path(argv[0], path, 0, len + 1); file->file.realpath = path; if (!check_elf_object(file)) {