-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace realpath implementation with libuv #33116
Conversation
windowserror(:realpath, iszero(len)) | ||
resize!(buf, len) # strips NUL terminator on last call | ||
end | ||
if 4 < len < 264 && 0x005c == buf[1] == buf[2] == buf[4] && 0x003f == buf[3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to recall that libuv is missing the length check, but otherwise lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean a max path type length check? I don't think I see that this is an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libuv doesn't check that len > 4
, but since it uses wcsncmp
(which stops at NUL chars) it should be fine there. It doesn't check len < 264
either, but I guess excluding actual paths with length > 263 that start with \\?\
is less of a practical concern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paths that start with \\?\
are extended paths and can extend up to 32 767 characters. So the len < 264
check should actually not occur.
|
filewatching failure on win32 and another fluke on freebsd |
merge? |
(cherry picked from commit 921b4f8)
fixes #32597 fixes #32298 fixes #33127