From 0b382a0d530218707f3ff1a787719600dae8402e Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 28 Oct 2011 13:09:04 +0200 Subject: [PATCH] fixed bug #34638: Dead code in tcp_receive - pcb->dupacks --- CHANGELOG | 3 +++ src/core/tcp_in.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 72f467ab..45ed3bfd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,9 @@ HISTORY ++ Bugfixes: + 2011-10-28: Simon Goldschmidt + * tcp_in.c: fixed bug #34638: Dead code in tcp_receive - pcb->dupacks + 2011-10-23: Simon Goldschmidt * mem.c: fixed bug #34429: possible memory corruption with LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT set to 1 diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index 5d56bdbd..fa5a861f 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -918,8 +918,9 @@ tcp_receive(struct tcp_pcb *pcb) /* Clause 5 */ if (pcb->lastack == ackno) { found_dupack = 1; - if (pcb->dupacks + 1 > pcb->dupacks) + if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { ++pcb->dupacks; + } if (pcb->dupacks > 3) { /* Inflate the congestion window, but not if it means that the value overflows. */