From 7f2220b8e97025ffba72a2ec83f51f9891637e66 Mon Sep 17 00:00:00 2001 From: Tomoki Shirasawa Date: Thu, 26 Nov 2015 16:58:15 +0900 Subject: [PATCH] set '\0' termination to readlink result. refs #643 --- executer/user/mcexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index 1555d207..771a5310 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -489,6 +489,7 @@ retry: fprintf(stderr, "lookup_exec_path(): error readlink\n"); return EINVAL; } + link_path[error] = '\0'; __dprintf("lookup_exec_path(): %s is link -> %s\n", path, link_path);