Fix BigInt exponentiation bypassing execution constraints by lahma · Pull Request #2350 · sebastienros/jint (original) (raw)

@lahma @claude

…os#2349)

Validate estimated result size before calling BigInteger.Pow to prevent memory exhaustion from inputs like 11n**711111111n. Limits result to 1 million bits (125 KB), throwing RangeError for excessive sizes. Also fixes missing negative exponent check in **= assignment operator.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

@lahmaenabled auto-merge (squash)

March 22, 2026 18:09

@lahma lahma deleted the fix-biginteger branch

March 22, 2026 18:25

This was referenced

Mar 23, 2026

This was referenced

Jun 8, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})