Skip to content

src: check size of args before using for exec_path

If we are in an artifically created Environment that has no args set, and uv_exepath returns an error (for instance, if /proc is not mounted on a Linux system), then we crash with a nullptr deref attempting to use argv[0].

Fixes: https://github.com/nodejs/node/issues/45901

This is already covered by multiple cctests as noted in the above issue, so I wasn't sure if an explicit test was needed. If so, I can add one.

Merge request reports

Loading