summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-18 23:13:40 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-18 23:13:40 +0200
commit8c40acf7cba891ff73f86cf75eba058e8cb495ac (patch)
treecee3b207c290061469dd63680e2806b136128ccf
parentd0b170c8133d0c155b18aabef919693dcba406dd (diff)
notify: properly NUL-terminate received messages
-rw-r--r--src/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index c2d5e5f0ef..dee6109c00 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -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;