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

Add fuzzer for C wrapper #689

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Conversation

CarlosEduR
Copy link
Member

No description provided.

fuzz/ada_c.c Outdated
ada_url out = ada_parse((char*)data, size);
bool is_valid = ada_is_valid(out);

if (out) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (out) {
if (is_valid) {

fuzz/ada_c.c Outdated
ada_get_host_type(out);
ada_get_hostname(out);
ada_get_href(out);
ada_get_origin(out);
Copy link
Member

Choose a reason for hiding this comment

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

you should free this, or it will leak and give false result

fuzz/ada_c.c Show resolved Hide resolved
@CarlosEduR
Copy link
Member Author

I plan to call the setters as well, then will make it ready for review.

@CarlosEduR CarlosEduR marked this pull request as ready for review June 18, 2024 13:25
@CarlosEduR CarlosEduR requested a review from anonrig June 18, 2024 13:55
@anonrig anonrig merged commit 9cd08da into ada-url:main Jun 18, 2024
68 checks passed
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.

None yet

2 participants