Allow whitespace termination. Internal use of /etc/resolv.conf relies
on this, and who knows what else would, too...
This commit is contained in:
parent
28585846d6
commit
8308463eba
@ -135,13 +135,16 @@ inet_aton(cp, addr)
|
|||||||
c++;
|
c++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\0' :
|
case '\0':
|
||||||
gotend = 1;
|
gotend = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* Invalid character, so fail */
|
if (isspace(*c)) {
|
||||||
return (0);
|
gotend = 1;
|
||||||
|
break;
|
||||||
|
} else
|
||||||
|
return (0); /* Invalid character, so fail */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user