From 0ef3b9b3c5eab3127bb2efc7b496d6c46b698a41 Mon Sep 17 00:00:00 2001 From: anderscarlman Date: Sat, 26 Apr 2003 20:32:23 +0000 Subject: [PATCH] Re-added code for checking tail-parameter for NULL in pbuf_chain() to provide for better backward compatibility. --- src/core/pbuf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index ead20bee..75fcf0af 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -642,6 +642,9 @@ pbuf_chain(struct pbuf *h, struct pbuf *t) LWIP_ASSERT("h != NULL", h != NULL); LWIP_ASSERT("t != NULL", t != NULL); + + if(t == NULL) + return; /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) {