[ip4addr_aton][bug] Parsing of the octal IP representation doesn't work fully properly

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ip4addr_aton][bug] Parsing of the octal IP representation doesn't work fully properly

Karol Domagalski
Dear LwIP developers

For now function `ip4addr_aton` returns 1 for this IP address
"192.168.095". This is a bug. 095 is not a valid octal number, and the
function should return 0 instead.

In attachment there is a patch that fixes it. There is also
"ip4addr_aton_test.c" which performs some tests for this function.

--
Kind regards,
Karol Domagalski
Software-Hardware Engineer

B.P.I. SoftCad
[hidden email]
www.softcad.com.pl


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel

fixed-parsing-of-the-octal-IP-representation.patch (1K) Download Attachment
ip4addr_aton_test.c (826 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ip4addr_aton][bug] Parsing of the octal IP representation doesn't work fully properly

goldsimon@gmx.de
Am 05.03.2020 um 12:19 schrieb Karol Domagalski:
> Dear LwIP developers
>
> For now function `ip4addr_aton` returns 1 for this IP address
> "192.168.095". This is a bug. 095 is not a valid octal number, and the
> function should return 0 instead.

Applied, thanks for the patch.

> In attachment there is a patch that fixes it. There is also
> "ip4addr_aton_test.c" which performs some tests for this function.

I've integrated that into test/unit/ip4/test_ip4.c

Regards,
Simon

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel