mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Fix potential numeric overflow in tree calculation.
This commit is contained in:
parent
7004ecc83f
commit
3d1d329dff
@ -21,7 +21,7 @@ impl From<&NetworkJsonNode> for NetworkTreeEntry {
|
||||
};
|
||||
let mut sum = 0;
|
||||
for n in value.rtts.iter() {
|
||||
let n = *n;
|
||||
let n = u16::min(*n, 100);
|
||||
sum += n;
|
||||
if n < min { min = n; }
|
||||
if n > max { max = n; }
|
||||
|
Loading…
Reference in New Issue
Block a user