From 1f3181bcbf53a73ccdd87ee42067842069804e36 Mon Sep 17 00:00:00 2001 From: albert <> Date: Sun, 22 Dec 2002 00:30:31 +0000 Subject: [PATCH] NUL-terminate (Jakub Bogusz) --- proc/ksym.c | 1 + 1 file changed, 1 insertion(+) diff --git a/proc/ksym.c b/proc/ksym.c index c8a326c0..e9bd8203 100644 --- a/proc/ksym.c +++ b/proc/ksym.c @@ -255,6 +255,7 @@ open_again: /* FIXME: memory leak */ _exit(42); } + buf[total] = '\0'; // parse_ksyms() expects NUL-terminated file *bufp = buf; *roomp = room; close(fd);