Commit 54ae5309 authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Rich Trott
Browse files

src: readlink("/proc/self/exe") -> uv_exename()

This commit also adds error handling. A THP-enabled build terminated
with an out-of-memory error on a system without /proc because it cast
the -1 from readlink() to size_t (i.e. ULONG_MAX) and then tried to
allocate a string of that size.

PR-URL: https://github.com/nodejs/node/pull/28333


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent 89344f5b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment