mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
oid: GIT_OID_*SZ is now GIT_OID_SHA1_*SIZE
In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
This commit is contained in:
@@ -62,7 +62,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
memcpy(commit_graph_buf.ptr, data, size);
|
||||
memcpy(commit_graph_buf.ptr + size, hash, GIT_HASH_SHA1_SIZE);
|
||||
|
||||
memcpy(oid.id, hash, GIT_OID_RAWSZ);
|
||||
memcpy(oid.id, hash, GIT_OID_SHA1_SIZE);
|
||||
} else {
|
||||
git_str_attach_notowned(&commit_graph_buf, (char *)data, size);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
goto cleanup;
|
||||
|
||||
/* Search for any oid, just to exercise that codepath. */
|
||||
if (git_commit_graph_entry_find(&e, &file, &oid, GIT_OID_HEXSZ) < 0)
|
||||
if (git_commit_graph_entry_find(&e, &file, &oid, GIT_OID_SHA1_HEXSIZE) < 0)
|
||||
goto cleanup;
|
||||
|
||||
cleanup:
|
||||
|
||||
Reference in New Issue
Block a user