libuv: uv_os_tmpdir, uv_os_homedir behavior on windows when TMP is empty string

On windows it seems that uv_os_tmpdir’s behavior when the environment variable TMP is set to an empty string is incorrect, the function returns fine and no error is raised, even though the sz and buffer look to contain random chars.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 20 (18 by maintainers)

Most upvoted comments

Ah, ok. I can confirm that GetTempPathW does return garbage.

julia> path = ones(UInt16, 1024); ccall(:GetTempPathW, stdcall, UInt32, (UInt32, Ptr{UInt16}), length(path), path)
0x00000001

julia> transcode(String, path)
"\x01\x01\x01\x01\x01\x01..."