about summary refs log tree commit diff
path: root/third_party/git/fuzz-pack-idx.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/fuzz-pack-idx.c')
-rw-r--r--third_party/git/fuzz-pack-idx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/git/fuzz-pack-idx.c b/third_party/git/fuzz-pack-idx.c
new file mode 100644
index 000000000000..0c3d777aac8d
--- /dev/null
+++ b/third_party/git/fuzz-pack-idx.c
@@ -0,0 +1,13 @@
+#include "object-store.h"
+#include "packfile.h"
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+	struct packed_git p;
+
+	load_idx("fuzz-input", GIT_SHA1_RAWSZ, (void *)data, size, &p);
+
+	return 0;
+}