Commit 286e7dbd4be38b9a72c867da87c77200062c25e5

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 cb0f706..f396149 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1229,7 +1229,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