summaryrefslogtreecommitdiff
path: root/fuzzers/packfile_fuzzer.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-01-26 13:07:28 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-06-20 17:05:29 -0400
commit8444b6dce71d53a44f300d7c023cdd075faaa872 (patch)
tree2d3fbe6f5120ba8cb54cc460d34f76489fdce2cb /fuzzers/packfile_fuzzer.c
parentc50b280fa5bf525c6f84c39826a28ea9360e9136 (diff)
downloadlibgit2-8444b6dce71d53a44f300d7c023cdd075faaa872.tar.gz
odb_hash*: accept the oid type to hash into
The git_odb_hash helper functions should not assume SHA1, and instead should be given the oid type that they're producing.
Diffstat (limited to 'fuzzers/packfile_fuzzer.c')
-rw-r--r--fuzzers/packfile_fuzzer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fuzzers/packfile_fuzzer.c b/fuzzers/packfile_fuzzer.c
index 7f448f6a4..3d6d9a3d8 100644
--- a/fuzzers/packfile_fuzzer.c
+++ b/fuzzers/packfile_fuzzer.c
@@ -90,7 +90,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (git_indexer_append(indexer, data, size, &stats) < 0)
goto cleanup;
if (append_hash) {
- if (git_odb_hash(&oid, data, size, GIT_OBJECT_BLOB) < 0) {
+ if (git_odb_hash(&oid, data, size, GIT_OBJECT_BLOB, GIT_OID_SHA1) < 0) {
fprintf(stderr, "Failed to compute the SHA1 hash\n");
abort();
}