icmp6: Don't copy too much data

Fix of the fix for bug #58553
This commit is contained in:
Erik Ekman 2020-06-24 01:09:37 +02:00 committed by Simon Goldschmidt
parent 6ffe30d9ba
commit ecd6009a5e

View File

@ -410,7 +410,7 @@ icmp6_send_response_with_addrs_and_netif(struct pbuf *p, u8_t code, u32_t data,
offset = sizeof(struct icmp6_hdr);
while (p && datalen) {
u16_t len = LWIP_MIN(datalen, p->len);
err_t res = pbuf_take_at(q, p->payload, datalen, offset);
err_t res = pbuf_take_at(q, p->payload, len, offset);
if (res != ERR_OK) break;
datalen -= len;
offset += len;