From efbad07643d460d8cfbe0a7a67658f7cd606f4ff Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 20 Jan 2012 21:19:26 +0100 Subject: [PATCH] fixed bug #35291: NULL pointer in pbuf_copy --- CHANGELOG | 3 +++ src/core/pbuf.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 818819eb..acc49196 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,9 @@ HISTORY ++ New features: + 2012-01-20: Simon Goldschmidt + * pbuf.c: fixed bug #35291: NULL pointer in pbuf_copy + 2012-01-16: Simon Goldschmidt * opt.h, icmp.c: Added option CHECKSUM_GEN_ICMP diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 40cfca38..a458b167 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -863,7 +863,7 @@ pbuf_copy(struct pbuf *p_to, struct pbuf *p_from) /* iterate through pbuf chain */ do { - LWIP_ASSERT("p_to != NULL", p_to != NULL); + LWIP_ERROR("p_to != NULL", p_to != NULL, return ERR_ARG;); /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { /* complete current p_from fits into current p_to */ -- 2.39.2