Commit fdddac1
committed
bgpd: Add a safety guard against uint64 max value if TLV length is 0
When the TLV length is less than 8 (which should never happen, because TLV
MUST not be propagated if no Next-next hops exist, but hack3rs don't care), we
have count 0, and then subtracting results with the very huge unsigned number.
Prevent this from happening.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>1 parent a6244e5 commit fdddac1
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | | - | |
95 | | - | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
0 commit comments