Commit 4cd5e1f
fix(size): avoid u64 overflow panic when parsing huge size args
Parsing size arguments like '+20000000T' used to panic due to
unchecked multiplication of quantity by the unit multiplier. Use
checked_mul so invalid (too-large) inputs are rejected as an error
from the CLI instead of aborting the process.1 parent 90e73d7 commit 4cd5e1f
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
0 commit comments