1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

journald: fix off by one in native transport

https://bugzilla.redhat.com/show_bug.cgi?id=1177184
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-12-26 08:34:18 -05:00
parent 0068de375c
commit 12a717f834

View File

@ -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;
}