Skip to content

Commit c80efb5

Browse files
author
Edward Thomson
committed
Merge pull request libgit2#3818 from meatcoder/fix_odb_read_error
Fix truncation of SHA in error message for git_odb_read
2 parents 24d10ca + 2076d32 commit c80efb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/odb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ int git_odb__error_notfound(
13621362
{
13631363
if (oid != NULL) {
13641364
char oid_str[GIT_OID_HEXSZ + 1];
1365-
git_oid_tostr(oid_str, oid_len, oid);
1365+
git_oid_tostr(oid_str, oid_len+1, oid);
13661366
giterr_set(GITERR_ODB, "Object not found - %s (%.*s)",
13671367
message, oid_len, oid_str);
13681368
} else

0 commit comments

Comments
 (0)