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 fuzzing using `cargo fuzz`, add test for resulting bug #80

Merged
merged 1 commit into from Mar 30, 2020

Conversation

@ArniDagur
Copy link
Contributor

ArniDagur commented Mar 25, 2020

Here I've added a fuzzing harness using cargo fuzz, along with a fuzzing target for parse_filter. Straight away, a bug was discovered, for which I've added a test case but not a fix: When the string Ѥ is input to the function, a crash occurs.

Ideally we would have a fuzzing target for each function in the crate's public interface, a lot of bugs can be found this way.

Instructions

  1. cargo install cargo-fuzz
  2. cargo fuzz run parse_filter
@ArniDagur
Copy link
Contributor Author

ArniDagur commented Mar 28, 2020

@AndriusA Should I write more fuzzing targets?

@AndriusA
Copy link
Collaborator

AndriusA commented Mar 28, 2020

this is a great contribution and one I've been thinking we should do for some time. I just need to look through it properly and fix the bug you've uncovered. If you feel like doing more - great!

@AndriusA AndriusA changed the base branch from master to fuzzing Mar 30, 2020
@AndriusA AndriusA merged commit 73cc828 into brave:fuzzing Mar 30, 2020
0 of 2 checks passed
0 of 2 checks passed
Travis CI - Pull Request Build Errored
Details
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.