mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
[PATCH] net: allow newline terminated IP addresses in in_aton
in_aton() gives weird results if it sees a newline at the end of the input. This patch makes it able to handle such input correctly. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
cd52d1ee9a
commit
1e2e565965
@ -175,7 +175,7 @@ __u32 in_aton(const char *str)
|
||||
if (*str != '\0')
|
||||
{
|
||||
val = 0;
|
||||
while (*str != '\0' && *str != '.')
|
||||
while (*str != '\0' && *str != '.' && *str != '\n')
|
||||
{
|
||||
val *= 10;
|
||||
val += *str - '0';
|
||||
|
Loading…
Reference in New Issue
Block a user