-
Notifications
You must be signed in to change notification settings - Fork 38.7k
fuzz: Implement fuzzed_dns_lookup_function as a lambda #21443
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
The head ref may contain hidden characters: "\u03BB"
Conversation
vasild
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7c8c140
| const bool allow_lookup = fuzzed_data_provider.ConsumeBool(); | ||
| const int default_port = fuzzed_data_provider.ConsumeIntegral<int>(); | ||
|
|
||
| auto fuzzed_dns_lookup_function = [&](const std::string&, bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is impossible to reuse if another FUZZ_TARGET() be added. It is ok since here we have just one FUZZ_TARGET() and if ever another one is added and reuse needed, then it could be done in another way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think (and hope) that the netbase_dns_lookup fuzzing harness should cover all our low-level DNS fuzzing needs, so I think the probability that we'll need to call fuzzed_dns_lookup_function from another FUZZ_TARGET in the future is relatively low.
In other words: let's cross that fuzzing bridge when we come to it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAGNI (you ain't gonna need it)
|
cr ACK 7c8c140 |
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK 7c8c140
|
3rd time today my ACK missed a merge by a few seconds...there are days like that :D |
Implement
fuzzed_dns_lookup_functionas a lambda.As wisely suggested by MarcoFalke in #19415 (comment). Thanks! :)