Skip to content
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

Fix NUL byte crash in resolver #9640

Merged
merged 1 commit into from
Apr 14, 2024
Merged

Fix NUL byte crash in resolver #9640

merged 1 commit into from
Apr 14, 2024

Conversation

devongovett
Copy link
Member

Closes #9476

I believe this should fix the NUL byte crash in the resolver that we've seen in the Windows tests, and also in React Spectrum CI. It resulted from some unsafe code in the path canonicalization function that tried to avoid a clone. I think the path was somehow being deallocated or moved from its memory location, resulting in paths becoming corrupted. There might be a way to make this work without clone, but I tested the performance and removing the unsafe code made no difference.

@mischnic mischnic merged commit 9865cbe into v2 Apr 14, 2024
16 of 17 checks passed
@mischnic mischnic deleted the fix-resolver-unsafe branch April 14, 2024 09:39
devongovett added a commit that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@parcel/resolver-default: strings passed to WinAPI cannot contain NULs
2 participants