From fcd90d9ac70c34c21386e6c08a38afdbabb6d00e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Aug 2017 14:15:56 +0200 Subject: 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(-) (limited to 'sys-utils/dmesg.c') diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 36d238f01..b626380f7 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -873,7 +873,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; -- cgit v1.2.3-55-g7522