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