mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 21:26:09 +00:00
* fix(ports): validate lsof PID parsing before assignment Add Number.isFinite guard on lsof 'p' line PID parsing in parseLsofOutput, consistent with the netstat branch in the same function which already validates with Number.isNaN. While the downstream if (current.pid) truthiness check catches NaN (falsy), adding validation at the parse site is defense-in- depth and eliminates an inconsistency within the same function. * test(ports): add edge case tests for parseLsofOutput Add test coverage for malformed lsof 'p' lines (empty PID, non-numeric suffix), zero PID, and empty input to verify the Number.isFinite guard correctly filters invalid entries.
12 KiB
12 KiB