зеркало из https://github.com/microsoft/git.git
Merge branch 'cc/split-index-config'
The split-index code configuration code used an unsafe git_path() function without copying its result out. * cc/split-index-config: read-cache: avoid using git_path() in freshen_shared_index()
This commit is contained in:
Коммит
3961c51699
|
@ -1824,9 +1824,10 @@ unmap:
|
|||
*/
|
||||
static void freshen_shared_index(char *base_sha1_hex, int warn)
|
||||
{
|
||||
const char *shared_index = git_path("sharedindex.%s", base_sha1_hex);
|
||||
char *shared_index = git_pathdup("sharedindex.%s", base_sha1_hex);
|
||||
if (!check_and_freshen_file(shared_index, 1) && warn)
|
||||
warning("could not freshen shared index '%s'", shared_index);
|
||||
free(shared_index);
|
||||
}
|
||||
|
||||
int read_index_from(struct index_state *istate, const char *path)
|
||||
|
|
Загрузка…
Ссылка в новой задаче