Ensure argument to printsys() is always nul terminated

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2021-05-06 10:03:01 +02:00
parent 52fc3f7176
commit ebced817a7

View File

@ -554,8 +554,11 @@ static void kernel_cb(int fd, void *arg)
if (len > 0)
memmove(line, p, len + 1);
}
if (len > 0)
if (len > 0) {
line[len] = 0;
printsys(line);
}
}
static int opensys(const char *file)