]> git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: correctly format tv_usec
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 9 Apr 2024 09:00:26 +0000 (11:00 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Dec 2024 10:14:47 +0000 (11:14 +0100)
commitdbf8956dffac96d5b73e103e531629ca229ab49d
tree1f681c0b6aedb04619f633ec286d57ac290e55ca
parent48e85a37a2ef7023e39d5e14848998a1eab61562
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>
(cherry picked from commit 6227b2b0585ee2ccf224cf70c7144296a814a4ab)
misc-utils/logger.c