浏览代码

rust/protover: fix check for overlapping ranges

Closes ticket 27649. Bugfix on e6625113c98c281b0a649598d7daa347c28915e9.
cypherpunks 5 年之前
父节点
当前提交
03c4d0ab9c
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      changes/bug27649
  2. 1 1
      src/rust/protover/protoset.rs

+ 4 - 0
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.

+ 1 - 1
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);