Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e2e5659 authored by Mitch Williams's avatar Mitch Williams Committed by John W. Linville
Browse files

[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: default avatarMitch Williams <mitch.a.williams@intel.com>
Acked-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cd52d1ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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';