diff --git a/libdnet-stripped/NMAP_MODIFICATIONS b/libdnet-stripped/NMAP_MODIFICATIONS index c433ad4e6..60472da5b 100644 --- a/libdnet-stripped/NMAP_MODIFICATIONS +++ b/libdnet-stripped/NMAP_MODIFICATIONS @@ -422,6 +422,34 @@ Index: src/intf.c ret = 0; while (fgets(buf, sizeof(buf), fp) != NULL) { +o Added casts to calls of ctype functions so that their arguments are explicitly +cast to (int) [Josh Marlow] +Index: src/blob.c +=================================================================== +--- src/blob.c (revision 14763) ++++ src/blob.c (working copy) +@@ -162,7 +162,7 @@ + for (p = (char *)fmt; *p != '\0'; p++) { + if (*p == '%') { + p++; +- if (isdigit((int)*p)) { ++ if (isdigit((int) (unsigned char) *p)) { + len = strtol(p, &p, 10); + } else if (*p == '*') { + len = va_arg(*ap, int); +Index: src/intf-win32.c +=================================================================== +--- src/intf-win32.c (revision 14763) ++++ src/intf-win32.c (working copy) +@@ -234,7 +234,7 @@ + char *p = (char *)device; + int n, type = _ifcombo_type(device); + +- while (isalpha(*p)) p++; ++ while (isalpha((int) (unsigned char) *p)) p++; + n = atoi(p); + + return (intf->ifcombo[type].idx[n]); ===CHANGES ALREADY MERGED TO UPSTREAM LIBDNET GO BELOW THIS LINE=== diff --git a/libdnet-stripped/src/blob.c b/libdnet-stripped/src/blob.c index 2db9ae415..57ff0c3af 100644 --- a/libdnet-stripped/src/blob.c +++ b/libdnet-stripped/src/blob.c @@ -162,7 +162,7 @@ blob_fmt(blob_t *b, int pack, const char *fmt, va_list *ap) for (p = (char *)fmt; *p != '\0'; p++) { if (*p == '%') { p++; - if (isdigit((int)*p)) { + if (isdigit((int) (unsigned char) *p)) { len = strtol(p, &p, 10); } else if (*p == '*') { len = va_arg(*ap, int); diff --git a/libdnet-stripped/src/intf-win32.c b/libdnet-stripped/src/intf-win32.c index 032bec977..c19edcb1c 100644 --- a/libdnet-stripped/src/intf-win32.c +++ b/libdnet-stripped/src/intf-win32.c @@ -234,7 +234,7 @@ _find_ifindex(intf_t *intf, const char *device) char *p = (char *)device; int n, type = _ifcombo_type(device); - while (isalpha(*p)) p++; + while (isalpha((int) (unsigned char) *p)) p++; n = atoi(p); return (intf->ifcombo[type].idx[n]);