logger: correctly format tv_usec
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 9 Apr 2024 09:00:26 +0000 (11:00 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Tue, 1 Oct 2024 18:13:03 +0000 (20:13 +0200)
commit83a1fbe2329a243879473421e6fa87bb81f8b56d
tree3a54ab2e094a528f5eb14e72871d26d7c5b31015
parentfb1b1d39e4bd9b45b38693abcb6a5ab4518e5696
logger: correctly format tv_usec

tv_usec is an unspecified signed integer type.
The format string %u assumes an unsigned int, which is incorrect.
Especially on 32bit big-endian, where it can lead to invalid values.

Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/util-linux/afef1b770ad80d50660bb2c53a0a8330b88d1049.camel@physik.fu-berlin.de/
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Gbp-Pq: Topic upstream-master
Gbp-Pq: Name logger-correctly-format-tv_usec.patch
misc-utils/logger.c