-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Follow up for changes requested in #1940 #1941
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
Conversation
@swift-ci please test |
CC: @gwynne @millenomi |
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'm not really delighted by having Array<>
right next to UnsafeMutableBufferPointer<>
when either one could serve the purpose for both cases, but other than that I love it 🙂 @compnerd has mentioned possibly normalizing this kind of usage across the Windows implementations at a later time, which is fine by me. I am curious which type of buffer is more in keeping with Foundation
's desired implementation style, however. @millenomi ?
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.
Looks good, other than @spevans' comment about the trailing /
@gwynne - I would like to get @millenomi to okay this as well since this has a subtle difference in behaviour (we will never go down the path of the env var check). |
@compnerd 👍 Definitely want @millenomi 's sign-off on this one. |
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.
Need error check on second call to GetTempPathW()
to avoid TOCTOU race
Query the desired buffer size and allocate an appropriate buffer for the temporary path query. This should prevent a truncated path from being given.
8cf5bae
to
7ac5d69
Compare
@swift-ci please test and merge |
1 similar comment
@swift-ci please test and merge |
Holding off until I can push an additional correction to the Darwin error handling. |
(Sorry for the spam about reviews, I'm still learning what some of these buttons do 😓) |
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.
Will do a separate PR
No description provided.