]> granicus.if.org Git - strace/commit
strace: handle possible NULL from localtime() call
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 26 Mar 2018 06:15:26 +0000 (08:15 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 4 Apr 2018 20:32:42 +0000 (20:32 +0000)
commita02a583b3fca3f9e4fe6d0d68114eb3cc20f3810
treec280f3e7a1f05c70f62793cb708e1102476cc2da
parentb7154bf1461cacc32065f383152491cc87baa81c
strace: handle possible NULL from localtime() call

* strace.c (printleader): Print raw tv_sec value if localtime() returned
NULL.
* tests/localtime.c: New file.
* tests/localtime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add localtime.
(MISC_TESTS): Add localtime.test.
(localtime_LDADD): New variable.
* tests/.gitignore: Add localtime.
* ci/install-dependencies.sh (common_packages): Add faketime.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Closes: https://github.com/strace/strace/issues/42
ci/install-dependencies.sh
strace.c
tests/.gitignore
tests/Makefile.am
tests/localtime.c [new file with mode: 0644]
tests/localtime.test [new file with mode: 0755]