Commit 2076d3291c6c65d58cab8154b9b08b2758b201c3

Sim Domingo 2016-06-09T22:50:53

fix error message SHA truncation in git_odb__error_notfound()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/odb.c b/src/odb.c
index 890e6e2..87c1bb6 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1362,7 +1362,7 @@ int git_odb__error_notfound(
 {
 	if (oid != NULL) {
 		char oid_str[GIT_OID_HEXSZ + 1];
-		git_oid_tostr(oid_str, oid_len, oid);
+		git_oid_tostr(oid_str, oid_len+1, oid);
 		giterr_set(GITERR_ODB, "Object not found - %s (%.*s)",
 			message, oid_len, oid_str);
 	} else