Skip to content

Commit

Permalink
Backported a fix for wrong segment size calculation.
Browse files Browse the repository at this point in the history
Original fix is here: lwip-tcpip/lwip@8e8571d

Issue spotted and documented here: SmingHub/Sming#2654
  • Loading branch information
slav-at-attachix committed Aug 10, 2023
1 parent b9a23a6 commit 44948e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lwip/core/tcp_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
if (oversize > 0) {
LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space);
seg = last_unsent;
oversize_used = oversize < len ? oversize : len;
oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len));
pos += oversize_used;
oversize -= oversize_used;
space -= oversize_used;
Expand Down

0 comments on commit 44948e8

Please sign in to comment.