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