mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 03:11:48 +00:00
o Fixed a bug in traceroute that could lead to a crash:
terminate called after throwing an instance of 'std::out_of_range'
what(): bitset::test
It happened when the preliminary distance guess for a target was
greater than 30, the size of an internal data structure. David and
Brandon tracked down the problem.
This commit is contained in:
parent
958ba69422
commit
9b468484c2
2 changed files with 9 additions and 2 deletions
|
|
@ -1,5 +1,12 @@
|
|||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Fixed a bug in traceroute that could lead to a crash:
|
||||
terminate called after throwing an instance of 'std::out_of_range'
|
||||
what(): bitset::test
|
||||
It happened when the preliminary distance guess for a target was
|
||||
greater than 30, the size of an internal data structure. David and
|
||||
Brandon tracked down the problem.
|
||||
|
||||
o Added a service probe and match lines for the Logitech/SlimDevices
|
||||
SqueezeCenter music server. [Patrik Karlsson]
|
||||
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ static unsigned int hop_cache_size();
|
|||
|
||||
HostState::HostState(Target *target) {
|
||||
this->target = target;
|
||||
current_ttl = MAX(1, HostState::distance_guess(target));
|
||||
current_ttl = MIN(MAX(1, HostState::distance_guess(target)), MAX_TTL);
|
||||
state = HostState::COUNTING_DOWN;
|
||||
reached_target = 0;
|
||||
pspec = HostState::get_probe(target);
|
||||
|
|
@ -1203,7 +1203,7 @@ void TracerouteState::read_replies(long timeout) {
|
|||
actual distance is. */
|
||||
int distance = get_initial_ttl_guess(reply.ttl) - reply.ttl + 1;
|
||||
if (distance > 0 && distance < host->current_ttl)
|
||||
host->current_ttl = distance;
|
||||
host->current_ttl = MIN(distance, MAX_TTL);
|
||||
}
|
||||
num_active_probes -= host->cancel_probes_above(probe->ttl);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue