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.
This commit is contained in:
Francois-Xavier Le Bail 2019-01-27 15:46:05 +01:00
parent 0b3880c91e
commit e9439e9b71

View File

@ -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);
}