notify: properly NUL-terminate received messages

This commit is contained in:
Lennart Poettering 2010-06-18 23:13:40 +02:00
parent d0b170c813
commit 8c40acf7cb

View file

@ -1656,7 +1656,8 @@ static int manager_process_notify_fd(Manager *m) {
continue;
}
char_array_0(buf);
assert((size_t) n < sizeof(buf));
buf[n] = 0;
if (!(tags = strv_split(buf, "\n\r")))
return -ENOMEM;