[systemd-commits] 2 commits - src/journal
Zbigniew Jędrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Fri Dec 26 06:05:50 PST 2014
src/journal/journald-native.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 92ee6447b1deef7c79962a8121fdf8e58acb3a83
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Dec 26 09:02:01 2014 -0500
journald: always allocate space for object fields
If OBJECT_PID= came as the last field, we would not reallocate the iovec to bigger size,
and fail the assertion later on in dispatch_message_real().
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index e994752..b0120ef 100644
--- a/src/journal/journald-native.c
+++ b/src/journal/journald-native.c
@@ -135,7 +135,7 @@ void server_process_native_message(
/* A property follows */
/* 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)) {
+ if (!GREEDY_REALLOC(iovec, m, n + 2 + N_IOVEC_META_FIELDS + N_IOVEC_OBJECT_FIELDS)) {
log_oom();
break;
}
commit 12a717f8347f3daf0ae46a2b71c7d011d9c12fea
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Fri Dec 26 08:34:18 2014 -0500
journald: fix off by one in native transport
https://bugzilla.redhat.com/show_bug.cgi?id=1177184
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index f701233..e994752 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;
}
More information about the systemd-commits
mailing list