]> git.ipfire.org Git - thirdparty/util-linux.git/commit
utmpdump: fix localtime() error handling
authorRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 11 Jun 2014 15:31:56 +0000 (17:31 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Wed, 11 Jun 2014 21:06:32 +0000 (23:06 +0200)
commit18df1cc77c20acf0d80cc5c5ef38afa2f3fa148e
tree0871cba82c2d8ef9278e75a9b6bc06415c7fa87f
parentd2a8b8d145435a39b489c51b200d80ab18bda9c7
utmpdump: fix localtime() error handling

If current TZ has no representation of a given time_t then localtime()
would return NULL and break the next strftime().

In practice this happens very likely on systems with 64bit time_t when
parsing broken binary data. Seen on aarch64 (and probably s390) using
our (incompatible) test wtmp data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
login-utils/utmpdump.c