Browse Source

deploy-ng: NULL terminate readlink() result in deploy-stub

Mitchell Stokes 7 years ago
parent
commit
495ce50d84
1 changed files with 1 additions and 0 deletions
  1. 1 0
      pandatool/src/deploy-stub/deploy-stub.c

+ 1 - 0
pandatool/src/deploy-stub/deploy-stub.c

@@ -545,6 +545,7 @@ static void *map_blob(off_t offset, size_t size) {
     perror("readlink(/proc/self/exe)");
     perror("readlink(/proc/self/exe)");
     return NULL;
     return NULL;
   }
   }
+  buffer[pathlen] = '\0';
   runtime = fopen(buffer, "rb");
   runtime = fopen(buffer, "rb");
 #endif
 #endif