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:
Edward Thomson
2022-01-22 23:10:03 -05:00
parent f98dd5438f
commit dbc4ac1c76
81 changed files with 355 additions and 355 deletions

View File

@@ -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: