summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2023-01-11 17:32:20 +0000
committerMike Perry <mikeperry-git@torproject.org>2023-01-11 17:32:20 +0000
commitc6ef04e0d07418f447209d86d642394a190b6702 (patch)
treee3c83614465dfaf45cf8807d3ab6f52d5a4cd630
parentb9c7825f0ebe4bf5f8afc12b97cd8482dc706064 (diff)
downloadtor-c6ef04e0d07418f447209d86d642394a190b6702.tar.gz
tor-c6ef04e0d07418f447209d86d642394a190b6702.zip
Coverity CID 1518991: Tighter bounds on consensus param value.
This prevents sign extension overflow in cwnd_became_full().
-rw-r--r--src/core/or/congestion_control_vegas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/or/congestion_control_vegas.c b/src/core/or/congestion_control_vegas.c
index 8f9c39cea6..b82c685d51 100644
--- a/src/core/or/congestion_control_vegas.c
+++ b/src/core/or/congestion_control_vegas.c
@@ -203,7 +203,7 @@ congestion_control_vegas_set_params(congestion_control_t *cc,
networkstatus_get_param(NULL, "cc_cwnd_full_gap",
VEGAS_CWND_FULL_GAP_DFLT,
0,
- INT32_MAX);
+ INT16_MAX);
cc_cwnd_full_per_cwnd =
networkstatus_get_param(NULL, "cc_cwnd_full_per_cwnd",