diff options
author | Karel Zak | 2017-08-16 14:15:56 +0200 |
---|---|---|
committer | Karel Zak | 2017-08-16 14:15:56 +0200 |
commit | fcd90d9ac70c34c21386e6c08a38afdbabb6d00e (patch) | |
tree | 0d3a1952a2d0197564559440d365fb4166c82bf2 /sys-utils/dmesg.c | |
parent | libblkid: fix compiler warning [-Wformat-truncation=] (diff) | |
download | kernel-qcow2-util-linux-fcd90d9ac70c34c21386e6c08a38afdbabb6d00e.tar.gz kernel-qcow2-util-linux-fcd90d9ac70c34c21386e6c08a38afdbabb6d00e.tar.xz kernel-qcow2-util-linux-fcd90d9ac70c34c21386e6c08a38afdbabb6d00e.zip |
dmesg: fix delimiter calculation
Reported-by: Laszlo Varkonyi <vlsoftsystems@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/dmesg.c')
-rw-r--r-- | sys-utils/dmesg.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |