From 8849a443a4116025fb8b88abeae4a417532606c6 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 23 Feb 2017 20:16:51 +0100 Subject: [PATCH] pbuf_ref: assert-check for 'ref' overflow (cherry picked from commit 76763c9bcd778bf67dc959e2992769c07ed0bdbe) --- src/core/pbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 4ca95b9a..059f83a5 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -822,6 +822,7 @@ pbuf_ref(struct pbuf *p) /* pbuf given? */ if (p != NULL) { SYS_ARCH_INC(p->ref, 1); + LWIP_ASSERT("pbuf ref overflow", p->ref > 0); } }