mirror of
https://github.com/nmap/nmap.git
synced 2026-01-21 21:59:08 +00:00
Updated uses of the ctype function to support explict casting of the arguments
to (int)(unsigned char).
This commit is contained in:
@@ -297,7 +297,7 @@ void Target::setHostName(char *name) {
|
||||
while (*p) {
|
||||
// I think only a-z A-Z 0-9 . and - are allowed, but I'll be a little more
|
||||
// generous.
|
||||
if (!isalnum(*p) && !strchr(".-+=:_~*", *p)) {
|
||||
if (!isalnum((int) (unsigned char) *p) && !strchr(".-+=:_~*", *p)) {
|
||||
log_write(LOG_STDOUT, "Illegal character(s) in hostname -- replacing with '*'\n");
|
||||
*p = '*';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user