From: Francois-Xavier Le Bail Date: Sun, 27 Jan 2019 14:46:05 +0000 (+0100) Subject: Report 32-bit timestamps with uppermost bit set as "Error converting time" X-Git-Tag: tcpdump-4.99-bp~942 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/e9439e9b713c835598f14f97b189b9d59c6cdb10 Report 32-bit timestamps with uppermost bit set as "Error converting time" In the ts_unix_print() function. This change is a followup to commit 8e9fb1eb02. --- diff --git a/util-print.c b/util-print.c index aa6cf87f..a982e86d 100644 --- a/util-print.c +++ b/util-print.c @@ -295,6 +295,11 @@ ts_date_hmsfrac_print(netdissect_options *ndo, int sec, int usec, static void ts_unix_print(netdissect_options *ndo, int sec, int usec) { + if ((unsigned)sec & 0x80000000) { + ND_PRINT("[Error converting time]"); + return; + } + ND_PRINT("%u", (unsigned)sec); ts_frac_print(ndo, usec); }