]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Coverity CID 1518991: Tighter bounds on consensus param value.
authorMike Perry <mikeperry-git@torproject.org>
Wed, 11 Jan 2023 17:32:20 +0000 (17:32 +0000)
committerMike Perry <mikeperry-git@torproject.org>
Wed, 11 Jan 2023 17:32:20 +0000 (17:32 +0000)
This prevents sign extension overflow in cwnd_became_full().

src/core/or/congestion_control_vegas.c

index 8f9c39cea65ed14fdcb4c6efe74f712472c1f862..b82c685d516d2f00366393eabfceca083f3dca29 100644 (file)
@@ -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",