From fb07a28c9929770abef81bc6496a7643f80a4f77 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 3 May 2012 19:45:22 +0200 Subject: [PATCH] fixed bug #36388 (PPP: checksum-only in last pbuf leads to pbuf with zero length) --- CHANGELOG | 4 ++++ src/netif/ppp/ppp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a38f5eb8..404798ca 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -80,6 +80,10 @@ HISTORY ++ Bugfixes: + 2012-05-03: Simon Goldschmidt (patch by David Empson) + * ppp.c: fixed bug #36388 (PPP: checksum-only in last pbuf leads to pbuf with + zero length) + 2012-03-27: Simon Goldschmidt * vj.c: fixed bug #35756 header length calculation problem in ppp/vj.c diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 0ba82f05..d880310e 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -1821,7 +1821,7 @@ pppInProc(PPPControlRx *pcrx, u_char *s, int l) } else { struct pbuf *inp; /* Trim off the checksum. */ - if(pcrx->inTail->len >= 2) { + if(pcrx->inTail->len > 2) { pcrx->inTail->len -= 2; pcrx->inTail->tot_len = pcrx->inTail->len; -- 2.39.2