-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 Convert.To/FromBase64 APIs #108247
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @dotnet/area-system-runtime |
src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/ConvertToBase64Fuzzer.cs
Outdated
Show resolved
Hide resolved
src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/ConvertToBase64Fuzzer.cs
Outdated
Show resolved
Hide resolved
|
||
namespace DotnetFuzzing.Fuzzers | ||
{ | ||
internal sealed class ConvertToBase64Fuzzer : IFuzzer |
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 isn't covering that much logic, and the interesting inputs are the same as with Base64Fuzzer
. Can we move the extra asserts into that one instead?
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.
Only Base64FormattingOptions.None path uses Base64 encoder, it has its own logic for other cases and also has logic for widening encoded char after calling Base64.EncodeTo***(...).
i.e there is some logic we want to be covered, plus I assume other Conver APIs fuzz tests will be added to this one
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.
But the inputs are base64, so the interesting corner cases will be similar between base64 APIs on Convert, or on the Base64 class.
If we were to add more fuzz testing for other APIs on Convert, I don't think we'd want them to share the fuzz target with this one as the inputs for base64 parsing have nothing in common with interesting inputs for parsing an int32.
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
@MihuBot fuzz ConvertToBase64 |
Add fuzzer for Convert.To/FromBase64*** APIs