Commit cca2a21
fix: reject zero-valued options.add in generatePrime
A zero-length or all-zero add buffer would pass validation and reach
the Rust generator where modulus operations assume non-zero add,
causing a division-by-zero panic. Throw ERR_OUT_OF_RANGE early.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bffd0a0 commit cca2a21
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
| 314 | + | |
314 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
| |||
0 commit comments