mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Avoid underflowing a variable, which would result in taking more
data from the stream queues then needed. Thanks to Timo Voelker for finding this bug and providing a fix. MFC after: 3 days
This commit is contained in:
parent
6a7016194d
commit
cb9fb7b2cb
1 changed files with 5 additions and 1 deletions
|
|
@ -7763,7 +7763,11 @@ sctp_fill_outqueue(struct sctp_tcb *stcb,
|
|||
}
|
||||
strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc);
|
||||
total_moved += moved;
|
||||
space_left -= moved;
|
||||
if (space_left >= moved) {
|
||||
space_left -= moved;
|
||||
} else {
|
||||
space_left = 0;
|
||||
}
|
||||
if (space_left >= SCTP_DATA_CHUNK_OVERHEAD(stcb)) {
|
||||
space_left -= SCTP_DATA_CHUNK_OVERHEAD(stcb);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue