fixed bug #36388 (PPP: checksum-only in last pbuf leads to pbuf with zero length)

This commit is contained in:
goldsimon 2012-05-03 19:45:22 +02:00
parent 1dff9aea62
commit fb07a28c99
2 changed files with 5 additions and 1 deletions

View File

@ -80,6 +80,10 @@ HISTORY
++ Bugfixes: ++ 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 2012-03-27: Simon Goldschmidt
* vj.c: fixed bug #35756 header length calculation problem in ppp/vj.c * vj.c: fixed bug #35756 header length calculation problem in ppp/vj.c

View File

@ -1821,7 +1821,7 @@ pppInProc(PPPControlRx *pcrx, u_char *s, int l)
} else { } else {
struct pbuf *inp; struct pbuf *inp;
/* Trim off the checksum. */ /* Trim off the checksum. */
if(pcrx->inTail->len >= 2) { if(pcrx->inTail->len > 2) {
pcrx->inTail->len -= 2; pcrx->inTail->len -= 2;
pcrx->inTail->tot_len = pcrx->inTail->len; pcrx->inTail->tot_len = pcrx->inTail->len;