From: Mike Perry Date: Wed, 11 Jan 2023 17:32:20 +0000 (+0000) Subject: Coverity CID 1518991: Tighter bounds on consensus param value. X-Git-Tag: tor-0.4.7.13~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6ef04e0d07418f447209d86d642394a190b6702;p=thirdparty%2Ftor.git Coverity CID 1518991: Tighter bounds on consensus param value. This prevents sign extension overflow in cwnd_became_full(). --- 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",