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

This commit is contained in:
Mitchell Stokes 2018-08-18 21:36:45 -07:00
parent 53dea28f53
commit 495ce50d84

View File

@ -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