1
0
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:
josh
2009-08-06 15:10:00 +00:00
parent 990db60861
commit df71e36084
14 changed files with 73 additions and 72 deletions

View File

@@ -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 = '*';
}