diff options
author | Hüseyin Açacak <110401522+huseyinacacak-janea@users.noreply.github.com> | 2024-07-30 00:50:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-29 17:50:11 -0400 |
commit | 83306585ff03dc1325f272922ad9c7737c2ad0b0 (patch) | |
tree | 7300ea83297cf29c706734444070fda23069212b /src/unix/linux.c | |
parent | 18266a69696349e9641871f55b88ad6e732a8789 (diff) | |
download | libuv-83306585ff03dc1325f272922ad9c7737c2ad0b0.tar.gz libuv-83306585ff03dc1325f272922ad9c7737c2ad0b0.zip |
win: fix env var in uv_os_homedir and uv_os_tmpdir (#4464)
If the corresponding environment variables are empty, the
uv_us_homedir() and uv_os_tmpdir() return garbage values. The reason
for this situation is the Windows API which doesn't return an error
even if the path is empty.
This PR fixes this problem by checking the return value of the API
call. If it is not an error and the length of the value is less than 3,
uv_us_homedir() and uv_os_tmpdir() will return UV_ENOENT.
Fixes: https://github.com/libuv/libuv/issues/2328
Diffstat (limited to 'src/unix/linux.c')
0 files changed, 0 insertions, 0 deletions