Re: [PATCH v4] name-hash: don't reuse cache_entry in dir_entry

2015-10-21 Thread Junio C Hamano
David Turner writes: > Stop reusing cache_entry in dir_entry; doing so causes a > use-after-free bug. > > During merges, we free entries that we no longer need in the > destination index. But those entries might have also been stored in > the dir_entry cache, and when a later call to add_to_inde

[PATCH v4] name-hash: don't reuse cache_entry in dir_entry

2015-10-21 Thread David Turner
Stop reusing cache_entry in dir_entry; doing so causes a use-after-free bug. During merges, we free entries that we no longer need in the destination index. But those entries might have also been stored in the dir_entry cache, and when a later call to add_to_index found them, they would be used a