Files
onefuzz/src/integration-tests/libfuzzer-dotnet/problems/problems.cs
2021-02-11 17:30:24 -05:00

16 lines
402 B
C#

using System;
namespace Problems {
public static class Problems {
public static void Func(ReadOnlySpan<byte> data) {
var count = 0;
if (data.Length < 4) {
return;
}
if (data[0] == 0) { count++; }
if (data[1] == 1) { count++; }
if (data[2] == 2) { count++; }
if (count >= 3) { throw new Exception("this is bad"); }
}
}
}