Commit 1e7b7523753a144597bff4a5a05f6e7c7e90c40e

Xavier L 2013-03-21T12:30:08

git_oid_fromstrn already sets a maximum on the length of the string

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/oid.c b/src/oid.c
index 0a0a814..1d994c3 100644
--- a/src/oid.c
+++ b/src/oid.c
@@ -53,7 +53,7 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length)
 
 int git_oid_fromstrp(git_oid *out, const char *str)
 {
-	return git_oid_fromstrn(out, str, min(strlen(str), GIT_OID_HEXSZ));
+	return git_oid_fromstrn(out, str, strlen(str));
 }
 
 int git_oid_fromstr(git_oid *out, const char *str)