git: 51d54ed6151b - stable/14 - tcpdump: Initialize tzcode early.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Sep 2023 10:31:37 UTC
The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=51d54ed6151b5381bca703d85762d9d054463003 commit 51d54ed6151b5381bca703d85762d9d054463003 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-09-15 21:36:41 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-09-19 10:10:21 +0000 tcpdump: Initialize tzcode early. An explicit tzset() call is usually not needed as it happens implicitly the first time we call localtime() or mktime(), but in some cases (sandboxing, chroot) this may be too late. PR: 273807 MFC after: 3 days Reviewed by: jrm Differential Revision: https://reviews.freebsd.org/D41880 (cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6) --- contrib/tcpdump/tcpdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c index 52209fedb999..8cfcb04fc093 100644 --- a/contrib/tcpdump/tcpdump.c +++ b/contrib/tcpdump/tcpdump.c @@ -1564,6 +1564,8 @@ main(int argc, char **argv) if (abort_on_misalignment(ebuf, sizeof(ebuf)) < 0) error("%s", ebuf); + tzset(); + while ( (op = getopt_long(argc, argv, SHORTOPTS, longopts, NULL)) != -1) switch (op) {