mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
fix pbuf_split_64k() for zero-length pbufs
This commit is contained in:
parent
b9d3812ee8
commit
3c5398403d
@ -1122,7 +1122,7 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest)
|
||||
struct pbuf *r = p->next;
|
||||
|
||||
/* continue until the total length (summed up as u16_t) overflows */
|
||||
while ((r != NULL) && ((u16_t)(tot_len_front + r->len) > tot_len_front)) {
|
||||
while ((r != NULL) && ((u16_t)(tot_len_front + r->len) >= tot_len_front)) {
|
||||
tot_len_front = (u16_t)(tot_len_front + r->len);
|
||||
i = r;
|
||||
r = r->next;
|
||||
|
Loading…
Reference in New Issue
Block a user