Ensure argument to printsys() is always nul terminated
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
parent
52fc3f7176
commit
ebced817a7
@ -554,8 +554,11 @@ static void kernel_cb(int fd, void *arg)
|
|||||||
if (len > 0)
|
if (len > 0)
|
||||||
memmove(line, p, len + 1);
|
memmove(line, p, len + 1);
|
||||||
}
|
}
|
||||||
if (len > 0)
|
|
||||||
|
if (len > 0) {
|
||||||
|
line[len] = 0;
|
||||||
printsys(line);
|
printsys(line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int opensys(const char *file)
|
static int opensys(const char *file)
|
||||||
|
Loading…
Reference in New Issue
Block a user