diff options
author | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-23 00:30:24 +0000 |
---|---|---|
committer | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-23 00:30:24 +0000 |
commit | 51f105ec894ba3b48bc0fb341b250d3de3f4c769 (patch) | |
tree | 76ad90cc6543b9dec6763d48bd4acacf1a30dafe /epan/dissectors/packet-icmp.c | |
parent | 3eb635f32bc53ef05f649b7ddd51e024f8f1cdd2 (diff) |
Avoid potential midday problems by narrowing the midnight rollover test.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38171 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-icmp.c')
-rw-r--r-- | epan/dissectors/packet-icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index 65982af95e..5b86b0298c 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -836,9 +836,9 @@ static guint32 get_best_guess_mstimeofday(tvbuff_t *tvb, gint offset, guint32 co /* Is this a rollover to a new day, clocks not synchronized, different * timezones between originate and receive/transmit, .. what??? */ - if (be_ts < comp_ts && be_ts <= (MSPERDAY / 2) && comp_ts >= (MSPERDAY - (MSPERDAY / 2))) + if (be_ts < comp_ts && be_ts <= (MSPERDAY / 4) && comp_ts >= (MSPERDAY - (MSPERDAY / 4))) be_ts += MSPERDAY; /* Assume a rollover to a new day */ - if (le_ts < comp_ts && le_ts <= (MSPERDAY / 2) && comp_ts >= (MSPERDAY - (MSPERDAY / 2))) + if (le_ts < comp_ts && le_ts <= (MSPERDAY / 4) && comp_ts >= (MSPERDAY - (MSPERDAY / 4))) le_ts += MSPERDAY; /* Assume a rollover to a new day */ if (abs(be_ts - comp_ts) < abs(le_ts - comp_ts)) return (saved_be_ts); |