Browse Source

bugfix: unnormalized manifest paths cause regression test failed

Chia-Che Tsai 7 years ago
parent
commit
dc66a38e7f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Pal/src/host/FreeBSD/db_main.c
  2. 1 1
      Pal/src/host/Linux/db_main.c

+ 1 - 1
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)) {

+ 1 - 1
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)) {