aboutsummaryrefslogtreecommitdiff
path: root/fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-06-08 22:22:32 +0200
committerBond_009 <bond.009@outlook.com>2021-06-08 22:22:32 +0200
commitf7392394fdcf882c97199d35a65647f201f3129e (patch)
tree4fb512c4b5fc6bffa31f1e94914bad37661c8966 /fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh
parentb986cb57b7a73236f5a3a1ed22ee8233bd0c75a8 (diff)
Add fuzzing infra
Diffstat (limited to 'fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh')
-rwxr-xr-xfuzz/Emby.Server.Implementations.Fuzz/fuzz.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh b/fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh
new file mode 100755
index 0000000000..244f734026
--- /dev/null
+++ b/fuzz/Emby.Server.Implementations.Fuzz/fuzz.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+dotnet build -c Release ../../Emby.Server.Implementations/Emby.Server.Implementations.csproj --output bin
+sharpfuzz bin/Emby.Server.Implementations.dll
+cp bin/Emby.Server.Implementations.dll .
+
+dotnet build
+mkdir -p Findings
+AFL_SKIP_BIN_CHECK=1 afl-fuzz -i "Testcases/$1" -o "Findings/$1" -t 5000 -m 10240 dotnet bin/Debug/net5.0/Emby.Server.Implementations.Fuzz.dll "$1"