]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: fix an off-by-one error in dev_kmsg_record
authorEvgeny Vereshchagin <evvers@ya.ru>
Fri, 16 Nov 2018 06:11:06 +0000 (07:11 +0100)
committerEvgeny Vereshchagin <evvers@ya.ru>
Fri, 16 Nov 2018 07:45:16 +0000 (08:45 +0100)
src/journal/journald-kmsg.c

index e343c3f192488e98f3a3484eb5a411f16a6d4a53..ce82102eeda625df9b761c339da48d88c1990ed0 100644 (file)
@@ -235,7 +235,7 @@ void dev_kmsg_record(Server *s, char *p, size_t l) {
                         j = 0;
                         FOREACH_DEVICE_DEVLINK(d, g) {
 
-                                if (j > N_IOVEC_UDEV_FIELDS)
+                                if (j >= N_IOVEC_UDEV_FIELDS)
                                         break;
 
                                 b = strappend("_UDEV_DEVLINK=", g);