]> git.ipfire.org Git - thirdparty/util-linux.git/commit
dmesg: fix wrong size calculation
authorKarel Zak <kzak@redhat.com>
Mon, 26 Feb 2024 13:30:55 +0000 (14:30 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Feb 2024 13:30:55 +0000 (14:30 +0100)
commit0e5031a425c727b16831c108a92271e240c29595
treee2632cec5f3aa46cf5a6e668a0d91dc5ec613d9c
parentcc64c4af66d5c8a2a7c73595e8fb79b6573d25c0
dmesg: fix wrong size calculation

* don't use string based function strspn() if work with non-zero terminated
  buffer

* make sure that message size is calculated from within buffer pointers

Fixes: https://github.com/util-linux/util-linux/issues/2807
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/dmesg.c