sharpfuzz
sharpfuzz copied to clipboard
Fixes issue with obfuscated libraries failing instrumentation
This is an attempt at fixing issue #54
Hmm unclear if this might just be masking the problem. This gets past instrumentation but then fails on fuzzing like so:
Unhandled exception. System.TypeInitializationException: The type initializer for '<Module>' threw an exception.
---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
at Iron.Pdf.Extensions.feqyia.elnidp()
at .cctor()
--- End of inner exception stack trace ---
at IronPdfFuzz.IronPdfFuzzing.<>c.<Main>b__0_0(String stream)
at SharpFuzz.Fuzzer.<>c__DisplayClass11_0.<Wrap>b__0(Stream stream)
at SharpFuzz.Fuzzer.RunWithoutAflFuzz(Action`1 action, Stream stream)
at SharpFuzz.Fuzzer.OutOfProcess.Run(Action`1 action)
at SharpFuzz.Fuzzer.OutOfProcess.Run(Action`1 action, Int32 bufferSize)
with a very simple fuzz harness:
static void Main(string[] args)
{
var renderer = new IronPdf.HtmlToPdf();
Fuzzer.OutOfProcess.Run(stream =>
{
Console.WriteLine(stream);
string fileContents = File.ReadAllText(stream);
Console.WriteLine(fileContents);
renderer.RenderHtmlAsPdf(fileContents);
});
}
```