summaryrefslogtreecommitdiff
path: root/oss-fuzz/fuzz-pack-idx.c
diff options
context:
space:
mode:
Diffstat (limited to 'oss-fuzz/fuzz-pack-idx.c')
-rw-r--r--oss-fuzz/fuzz-pack-idx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/oss-fuzz/fuzz-pack-idx.c b/oss-fuzz/fuzz-pack-idx.c
new file mode 100644
index 0000000000..0c3d777aac
--- /dev/null
+++ b/oss-fuzz/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;
+}