summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-icmp.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-07-23 00:30:24 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-07-23 00:30:24 +0000
commit0693606010eaa853b0c1560319ae0184a538c09e (patch)
tree76ad90cc6543b9dec6763d48bd4acacf1a30dafe /epan/dissectors/packet-icmp.c
parentc67363e4def37f263d4727d757ef715e2c38ad76 (diff)
downloadwireshark-0693606010eaa853b0c1560319ae0184a538c09e.tar.gz
Avoid potential midday problems by narrowing the midnight rollover test.
svn path=/trunk/; revision=38171
Diffstat (limited to 'epan/dissectors/packet-icmp.c')
-rw-r--r--epan/dissectors/packet-icmp.c4
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);