Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/oid.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2013-03-26 00:39:11 +0400
committerVicent Marti <tanoku@gmail.com>2013-03-26 00:39:11 +0400
commit13640d1bb8376e3f07f66498a5b9bdde9ff3d7d6 (patch)
tree72b2030e9bf518a2d58513283457ffa8793aebce /src/oid.c
parent1f10747854f04d0ff0e582682613a7cc8a3bcbc8 (diff)
oid: Do not parse OIDs longer than 40
Diffstat (limited to 'src/oid.c')
-rw-r--r--src/oid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/oid.c b/src/oid.c
index 1d994c362..ab69eeb17 100644
--- a/src/oid.c
+++ b/src/oid.c
@@ -25,7 +25,7 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length)
int v;
if (length > GIT_OID_HEXSZ)
- length = GIT_OID_HEXSZ;
+ return oid_error_invalid("too long");
for (p = 0; p < length - 1; p += 2) {
v = (git__fromhex(str[p + 0]) << 4)