mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Don't overpromote values when calculating len in tcp_output().
sbavail() returns u_int and sendwin is a uint32_t. Therefore, min() (which operates on two u_int values) is able to correctly calculate the minimum of these two arguments. Reported by: rrs MFC after: 1 week Sponsored by: Netflix
This commit is contained in:
parent
124569d0ce
commit
cb503ae22d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320682
@ -386,7 +386,7 @@ after_sack_rexmit:
|
||||
*/
|
||||
if (sack_rxmit == 0) {
|
||||
if (sack_bytes_rxmt == 0)
|
||||
len = ((int32_t)ulmin(sbavail(&so->so_snd), sendwin) -
|
||||
len = ((int32_t)min(sbavail(&so->so_snd), sendwin) -
|
||||
off);
|
||||
else {
|
||||
int32_t cwin;
|
||||
|
Loading…
Reference in New Issue
Block a user