Commit e03eac2
ovs-router: Fix potential integer overflow.
There was a theoretical (but unlikely to happen in practice) integer
overflow in ovs_router_rule_add_cmd() in the case when rule list
comprised only of rules with priority zero, the new rule priority would
be calculated as UINT_MAX.
Coverity issue:
CID 556927: Integer handling issues (INTEGER_OVERFLOW)
Expression "rule->prio - 1U", where "rule->prio" is known to be
equal to 0, under-flows the type of "rule->prio - 1U", which is
type "unsigned int".
Fixes: e2a2415 ("ovs-router: Introduce ovs/route/rule/{add, del} commands.")
Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>1 parent 708c83f commit e03eac2
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
1034 | | - | |
| 1033 | + | |
1035 | 1034 | | |
1036 | 1035 | | |
1037 | 1036 | | |
| |||
0 commit comments