mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Use strcasecmp, not strcasestr, in hostcmp.
hostcmp is documented to determine whether "a and b are considered the same hostnames." But what it's really doing is testing whether a contains b. This isn't even symmetric, so I think it's wrong.
This commit is contained in:
parent
8b88d901a9
commit
4937b2e063
1 changed files with 1 additions and 1 deletions
|
|
@ -1837,7 +1837,7 @@ void printosscanoutput(Target *currenths) {
|
|||
/* An auxillary function for printserviceinfooutput(). Returns
|
||||
non-zero if a and b are considered the same hostnames. */
|
||||
static int hostcmp(const char *a, const char *b) {
|
||||
return strcasestr(a, b) ? 1 : 0;
|
||||
return strcasecmp(a, b) == 0;
|
||||
}
|
||||
|
||||
/* Prints the alternate hostname/OS/device information we got from the service
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue