From 8fe567b86f96555ba27ab421db58f175b63a64db Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Tue, 30 Jun 2020 01:25:49 +0200 Subject: [PATCH] ip6: Fix incorrect assert in ip6_frag() New test case now passes. Fixes bug #57374 (Found by Hiromasa Ito). --- src/core/ipv6/ip6_frag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv6/ip6_frag.c b/src/core/ipv6/ip6_frag.c index d6c5d223..8b352f56 100644 --- a/src/core/ipv6/ip6_frag.c +++ b/src/core/ipv6/ip6_frag.c @@ -781,7 +781,7 @@ ip6_frag(struct pbuf *p, struct netif *netif, const ip6_addr_t *dest) return ERR_MEM; } LWIP_ASSERT("this needs a pbuf in one piece!", - (p->len >= (IP6_HLEN))); + (rambuf->len >= (IP6_HLEN))); SMEMCPY(rambuf->payload, original_ip6hdr, IP6_HLEN); ip6hdr = (struct ip6_hdr *)rambuf->payload; frag_hdr = (struct ip6_frag_hdr *)((u8_t*)rambuf->payload + IP6_HLEN);