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
This commit is contained in:
commit
113656eca6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user