summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-08-15 20:36:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-08-15 20:36:47 (GMT)
commit45b65a6b676639e62bae1367f3902bfc470e5661 (patch)
tree455f9684b98ad08e5457f3e6c03dcf92ed22e853
parentb17a01df49a43e0edd7d26397deb79c1b1089d0c (diff)
parentcb2912c324477f0d92618ac258c43b2692e870c4 (diff)
downloadgit-45b65a6b676639e62bae1367f3902bfc470e5661.zip
git-45b65a6b676639e62bae1367f3902bfc470e5661.tar.gz
git-45b65a6b676639e62bae1367f3902bfc470e5661.tar.bz2
Merge branch 'hv/link-alt-odb-entry' into maint
* hv/link-alt-odb-entry: link_alt_odb_entry: fix read over array bounds reported by valgrind
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 4ccaf7a..af5cfbd 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -298,7 +298,7 @@ static int link_alt_odb_entry(const char * entry, int len, const char * relative
return -1;
}
}
- if (!memcmp(ent->base, objdir, pfxlen)) {
+ if (!strcmp(ent->base, objdir)) {
free(ent);
return -1;
}