]> 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)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 9 Apr 2024 09:10:16 +0000 (11:10 +0200)
commit6227b2b0585ee2ccf224cf70c7144296a814a4ab
tree1951e5533cfafe1d51fb878077c4d9fd20982f15
parent564750580b2a78c2f3f0e8d02bdef9503d6b110c
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>
misc-utils/logger.c