aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-08-15 13:36:47 -0700
committerJunio C Hamano <gitster@pobox.com>2012-08-15 13:36:47 -0700
commit45b65a6b676639e62bae1367f3902bfc470e5661 (patch)
tree455f9684b98ad08e5457f3e6c03dcf92ed22e853
parentPrepare for 1.7.11.5 (diff)
parentlink_alt_odb_entry: fix read over array bounds reported by valgrind (diff)
downloadgit-45b65a6b676639e62bae1367f3902bfc470e5661.tar.gz
git-45b65a6b676639e62bae1367f3902bfc470e5661.zip
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 4ccaf7ac19..af5cfbde63 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;
}