]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
rust/protover: fix check for overlapping ranges
authorcypherpunks <cypherpunks@torproject.org>
Wed, 12 Sep 2018 02:14:29 +0000 (02:14 +0000)
committercypherpunks <cypherpunks@torproject.org>
Wed, 12 Sep 2018 02:47:59 +0000 (02:47 +0000)
Closes ticket 27649. Bugfix on e6625113c98c281b0a649598d7daa347c28915e9.

changes/bug27649 [new file with mode: 0644]
src/rust/protover/protoset.rs

diff --git a/changes/bug27649 b/changes/bug27649
new file mode 100644 (file)
index 0000000..6498e96
--- /dev/null
@@ -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.
index 7e6f606a2fa09262a877972dd6b6f888f2110644..b99e1a99f7921d14003e61339a04fbb0e0b49934 100644 (file)
@@ -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);