-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Fix missing null terminator in runtime path resolution on Linux #85350
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 smoke test |
|
@al45tair - Hello. I am seeing that the smoke tests failed, but looking at the console output it looks like the failures are unrelated to my changes. What do I need to do to proceed here? Thanks. |
|
Looks like we just need to re-trigger them. |
|
@swift-ci Please smoke test |
|
One of the smoke tests (for windows) failed, on the following: This looks like it's an issue with the environment of the smoke test itself, but I don't know how to dig deeper on this. |
|
@aeu This is an unrelated failure, and it's affecting everyone I think. I'll chase it up. |
|
This looks like a dependency graph problem; I think we'll need #85454 to fix it. |
|
@swift-ci Please smoke test Windows platform |
|
@swift-ci Please smoke test Windows platform |
|
@al45tair - clean smoke test, looks like the fixes to the Windows test suite worked. |
readlink does not null terminate the output buffer. The existing code passed the full buffer size to readlink, which did not leave any space to append a terminator.
This change passes size -1 to readlink and terminates the buffer with a '\0' after a successful read to avoid reading past the end of the buffer.
This change is consistent with the usage pattern seen in swift-foundation-icu / icuSources / common / putil.cpp