diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-12-26 14:34:18 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-12-26 15:02:27 +0100 |
commit | 12a717f8347f3daf0ae46a2b71c7d011d9c12fea (patch) | |
tree | a9a6ec12e601636b5c35ffaddbdbeceabb45de24 /src/journal/journald-native.c | |
parent | hwdb: mouse - add Razer Abyssus (diff) | |
download | systemd-12a717f8347f3daf0ae46a2b71c7d011d9c12fea.tar.xz systemd-12a717f8347f3daf0ae46a2b71c7d011d9c12fea.zip |
journald: fix off by one in native transport
https://bugzilla.redhat.com/show_bug.cgi?id=1177184
Diffstat (limited to 'src/journal/journald-native.c')
-rw-r--r-- | src/journal/journald-native.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c index f701233bbe..e994752558 100644 --- a/src/journal/journald-native.c +++ b/src/journal/journald-native.c @@ -134,8 +134,8 @@ void server_process_native_message( /* A property follows */ - /* n received properties, +1 for _TRANSPORT */ - if (!GREEDY_REALLOC(iovec, m, n + 1 + N_IOVEC_META_FIELDS + !!object_pid * N_IOVEC_OBJECT_FIELDS)) { + /* n existing properties, 1 new, +1 for _TRANSPORT */ + if (!GREEDY_REALLOC(iovec, m, n + 2 + N_IOVEC_META_FIELDS + !!object_pid * N_IOVEC_OBJECT_FIELDS)) { log_oom(); break; } |