icmp6: Don't copy too much data

Fix of the fix for bug #58553
This commit is contained in:
Erik Ekman
2021-12-07 08:06:22 +00:00
committed by David Čermák
parent 7c822ff4e5
commit 4a64731b5b
+1 -1
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;