ip4: ip4addr_aton: fix parsing of the octal IP representation

This commit is contained in:
Karol Domagalski 2020-03-05 11:34:59 +01:00 committed by Erik Ekman
parent d876d3c4df
commit 3b745f7154

View File

@ -173,6 +173,8 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr)
}
for (;;) {
if (lwip_isdigit(c)) {
if((base == 8) && ((u32_t)(c - '0') >= 8))
break;
val = (val * base) + (u32_t)(c - '0');
c = *++cp;
} else if (base == 16 && lwip_isxdigit(c)) {