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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-14 01:53:43 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-14 01:53:43 +0300
commit113656eca6c58b8db61c3c8e8218f7debe33708a (patch)
tree5528ce89526e0afc2a23813a0a82152694b9115f /read-cache.c
parent2246937e4165d4a7a238f1ea52da36bc7aa1274a (diff)
parent6d858341d284e08320dc2dbf1952d7a37884e5f3 (diff)
Merge branch 'zh/read-cache-copy-name-entry-fix'
Remove redundant copying (with index v3 and older) or possible over-reading beyond end of mmapped memory (with index v4) has been corrected. * zh/read-cache-copy-name-entry-fix: read-cache.c: reduce unnecessary cache entry name copying
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c
index 96ce489c7c..e61af3a3d4 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1944,8 +1944,6 @@ static struct cache_entry *create_from_disk(struct mem_pool *ce_mem_pool,
ce->ce_namelen = len;
ce->index = 0;
oidread(&ce->oid, ondisk->data);
- memcpy(ce->name, name, len);
- ce->name[len] = '\0';
if (expand_name_field) {
if (copy_len)