Merge pull request #1159 from he32/isdigit-fix

strnatcmp.c: ensure correct value range for isdigit() argument.
pull/1170/head
Tim Stack 1 year ago committed by GitHub
commit 2d870dece8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -275,13 +275,13 @@ int ipv4cmp(int a_len, nat_char const *a,
}
for (; ai < a_len; ai++) {
if (!isdigit(a[ai]) || a[ai] != '.') {
if (!isdigit((unsigned char)a[ai]) || a[ai] != '.') {
return 0;
}
}
for (; bi < b_len; bi++) {
if (!isdigit(b[bi]) || b[bi] != '.') {
if (!isdigit((unsigned char)b[bi]) || b[bi] != '.') {
return 0;
}
}

Loading…
Cancel
Save