[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.3.4] rust/protover: fix check for overlapping ranges



commit 03c4d0ab9cfb60ba036bb8e5fe980a5bd2551f7d
Author: cypherpunks <cypherpunks@xxxxxxxxxxxxxx>
Date:   Wed Sep 12 02:14:29 2018 +0000

    rust/protover: fix check for overlapping ranges
    
    Closes ticket 27649. Bugfix on e6625113c98c281b0a649598d7daa347c28915e9.
---
 changes/bug27649              | 4 ++++
 src/rust/protover/protoset.rs | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug27649 b/changes/bug27649
new file mode 100644
index 000000000..6498e961e
--- /dev/null
+++ b/changes/bug27649
@@ -0,0 +1,4 @@
+  o Minor bugfixes (rust):
+    - The protover rewrite in #24031 allowed repeated votes from the same
+      voter for the same protocol version to be counted multiple times in
+      protover_compute_vote(). Bugfix on 0.3.3.5-rc; fixes bug 27649.
diff --git a/src/rust/protover/protoset.rs b/src/rust/protover/protoset.rs
index 7e6f606a2..b99e1a99f 100644
--- a/src/rust/protover/protoset.rs
+++ b/src/rust/protover/protoset.rs
@@ -174,7 +174,7 @@ impl ProtoSet {
             if low == u32::MAX || high == u32::MAX {
                 return Err(ProtoverError::ExceedsMax);
             }
-            if low < last_high {
+            if low <= last_high {
                 return Err(ProtoverError::Overlap);
             } else if low > high {
                 return Err(ProtoverError::LowGreaterThanHigh);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits