fix(utils): Prevent RangeError from large command output #433
+123
−21
@sentry/warden / warden: find-bugs
completed
May 29, 2026 in 9m 45s
1 issue
find-bugs: Found 1 issue (1 low)
Low
Second `Buffer.concat` in `finalizeStream` catch block can escape as uncaught exception - `src/utils/command.ts:129-132`
If Buffer.concat(chunks, totalBytes) itself throws in the catch block (not just .toString()), the exception propagates uncaught through settle() into an event handler, which is the crash scenario this PR aims to prevent. Use the already-allocated buffer from the failed try block, or bound the retry with a try/catch.
⏱ 8m 40s · 494.0k in / 40.0k out · $1.48
Loading