Skip to content

fix(utils): Prevent RangeError from large command output

6155c40
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

fix(utils): Prevent RangeError from large command output #433

fix(utils): Prevent RangeError from large command output
6155c40
Select commit
Loading
Failed to load commit list.
GitHub Actions / warden: find-bugs completed May 29, 2026 in 8m 3s

1 issue

find-bugs: Found 1 issue (1 low)

Low

Catch block in `finalizeStream` re-throws if `Buffer.concat` itself fails - `src/utils/command.ts:128-130`

In the catch block, Buffer.concat(chunks, totalBytes) is called a second time with identical arguments; if the caught error originated from Buffer.concat rather than .toString('utf8') (e.g. a Node.js internal error or corrupted chunk), the catch block throws the same error, escaping settle() into the childProcess.once('close', …) event handler as an uncaught exception — the exact crash mode this PR aims to prevent.


⏱ 7m 27s · 322.0k in / 36.7k out · $1.29