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 URL bugs found by fuzzing #2842

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Fix URL bugs found by fuzzing #2842

merged 2 commits into from
Oct 2, 2024

Conversation

fhanau
Copy link
Collaborator

@fhanau fhanau commented Oct 2, 2024

Fix minor buffer overflow in url.c++
When the protocol string is empty, we should not try to drop a trailing colon. This was found by using a new fuzzer for URL-related APIs.

Fix URL assertion failure found by fuzzing
This aligns canonicalizeOpaquePathname() with the other canonicalize functions.
Also elides a superfluous memory allocation.

Also see the upstream draft PR.

When the protocol string is empty, we should not try to drop a trailing
colon. This was found by using a new fuzzer for URL-related APIs.
This aligns canonicalizeOpaquePathname() with the other canonicalize
functions.
Also elides a superfluous memory allocation.
@fhanau fhanau requested a review from anonrig October 2, 2024 21:55
@fhanau fhanau requested review from a team as code owners October 2, 2024 21:55
@fhanau fhanau requested a review from mikea October 2, 2024 21:55
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer if we have some tests for it, but LGTM

@fhanau fhanau merged commit 3e6246a into main Oct 2, 2024
14 checks passed
@fhanau fhanau deleted the felix/url-fuzz-bu branch October 2, 2024 23:54
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.

2 participants