Commit 6191529
Use SafeInt for overflow-safe coefficients size validation
Address review feedback: the multiplication of num_targets * num_features
could overflow with very large dimensions. Use SafeInt for checked
multiplication and also reject negative num_targets.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f2b60a1 commit 6191529
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
0 commit comments