diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2016-04-27 10:32:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-27 10:32:05 +0200 |
commit | daf535a3829121155683e63e729093347b691a3e (patch) | |
tree | 3e95990022b6e1f91fca10fe3920bdba1e549ba6 /src/journal/journald-native.c | |
parent | path-util: Add hidden suffixes for ucf (#3131) (diff) | |
download | systemd-daf535a3829121155683e63e729093347b691a3e.tar.xz systemd-daf535a3829121155683e63e729093347b691a3e.zip |
Correctly parse OBJECT_PID in journald messages (#3129)
The parse_pid() function doesn't succeed if we don't zero-terminate after the
last digit in the buffer.
Diffstat (limited to 'src/journal/journald-native.c')
-rw-r--r-- | src/journal/journald-native.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c index 3d8f05996b..a445291a5e 100644 --- a/src/journal/journald-native.c +++ b/src/journal/journald-native.c @@ -206,7 +206,7 @@ void server_process_native_message( allow_object_pid(ucred)) { char buf[DECIMAL_STR_MAX(pid_t)]; memcpy(buf, p + strlen("OBJECT_PID="), l - strlen("OBJECT_PID=")); - char_array_0(buf); + buf[l-strlen("OBJECT_PID=")] = '\0'; /* ignore error */ parse_pid(buf, &object_pid); |