From b9ccf6fe72193f508e2a1f44ecfd369e0689bd84 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Aug 2017 14:15:56 +0200 Subject: [PATCH] dmesg: fix delimiter calculation Reported-by: Laszlo Varkonyi Signed-off-by: Karel Zak --- sys-utils/dmesg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 6ddc48cbba..b15bc759e9 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -862,7 +862,7 @@ static const char *get_subsys_delimiter(const char *mesg, size_t mesg_size) const char *d = strnchr(p, sz, ':'); if (!d) return NULL; - sz -= d - p; + sz -= d - p + 1; if (sz) { if (isblank(*(d + 1))) return d; -- 2.47.3