Skip to content

Commit

Permalink
dhcp: decoded DNS servers should be limited to LWIP_DHCP_PROVIDE_DNS_…
Browse files Browse the repository at this point in the history
…SERVERS instead of DNS_MAX_SERVERS
  • Loading branch information
avtolstoy committed Jul 9, 2019
1 parent 9bda655 commit 4fe0495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ipv4/dhcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
/* special case: there might be more than one server */
LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;);
/* limit number of DNS servers */
decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS);
decode_len = LWIP_MIN(len, 4 * LWIP_DHCP_PROVIDE_DNS_SERVERS);
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
decode_idx = DHCP_OPTION_IDX_DNS_SERVER;
break;
Expand Down

0 comments on commit 4fe0495

Please sign in to comment.