mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-17 17:10:03 +00:00
* tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused
if tcp_seg_copy fails.
This commit is contained in:
parent
b94e3a874d
commit
139944a3ac
@ -35,6 +35,11 @@ HISTORY
|
|||||||
|
|
||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2008-06-24 Jonathan Larmour
|
||||||
|
* tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused
|
||||||
|
if tcp_seg_copy fails.
|
||||||
|
|
||||||
2008-06-17 Simon Goldschmidt
|
2008-06-17 Simon Goldschmidt
|
||||||
* inet_chksum.c: Checked in some ideas of patch #6460 (loop optimizations)
|
* inet_chksum.c: Checked in some ideas of patch #6460 (loop optimizations)
|
||||||
and created defines for swapping bytes and folding u32 to u16.
|
and created defines for swapping bytes and folding u32 to u16.
|
||||||
|
@ -1195,14 +1195,14 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
} else {
|
} else {
|
||||||
pcb->ooseq = cseg;
|
pcb->ooseq = cseg;
|
||||||
}
|
}
|
||||||
}
|
tcp_seg_free(next);
|
||||||
tcp_seg_free(next);
|
if (cseg->next != NULL) {
|
||||||
if (cseg->next != NULL) {
|
next = cseg->next;
|
||||||
next = cseg->next;
|
if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
|
||||||
if (TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
|
/* We need to trim the incoming segment. */
|
||||||
/* We need to trim the incoming segment. */
|
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
|
||||||
cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
|
pbuf_realloc(cseg->p, cseg->len);
|
||||||
pbuf_realloc(cseg->p, cseg->len);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user