From 495ce50d84b281eb01dba5d31f163dd21f4352fe Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sat, 18 Aug 2018 21:36:45 -0700 Subject: [PATCH] deploy-ng: NULL terminate readlink() result in deploy-stub --- pandatool/src/deploy-stub/deploy-stub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pandatool/src/deploy-stub/deploy-stub.c b/pandatool/src/deploy-stub/deploy-stub.c index cf44de992e..0acf31085a 100644 --- a/pandatool/src/deploy-stub/deploy-stub.c +++ b/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)"); return NULL; } + buffer[pathlen] = '\0'; runtime = fopen(buffer, "rb"); #endif