b9a53a
From f00d221d5dc92a530e260db5f44fa57653f03e8b Mon Sep 17 00:00:00 2001
b9a53a
From: Evgeny Vereshchagin <evvers@ya.ru>
b9a53a
Date: Fri, 16 Nov 2018 07:11:06 +0100
b9a53a
Subject: [PATCH] journal: fix an off-by-one error in dev_kmsg_record
b9a53a
b9a53a
(cherry picked from commit 080d112caa0dc948555a69a008c1caf4d5d41ed6)
b9a53a
b9a53a
Resolves: #1764560
b9a53a
---
b9a53a
 src/journal/journald-kmsg.c | 2 +-
b9a53a
 1 file changed, 1 insertion(+), 1 deletion(-)
b9a53a
b9a53a
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
b9a53a
index 0cdf1c4794..726c006ce1 100644
b9a53a
--- a/src/journal/journald-kmsg.c
b9a53a
+++ b/src/journal/journald-kmsg.c
b9a53a
@@ -239,7 +239,7 @@ void dev_kmsg_record(Server *s, char *p, size_t l) {
b9a53a
                         ll = udev_device_get_devlinks_list_entry(ud);
b9a53a
                         udev_list_entry_foreach(ll, ll) {
b9a53a
 
b9a53a
-                                if (j > N_IOVEC_UDEV_FIELDS)
b9a53a
+                                if (j >= N_IOVEC_UDEV_FIELDS)
b9a53a
                                         break;
b9a53a
 
b9a53a
                                 g = udev_list_entry_get_name(ll);