mirror of
https://github.com/git/git
synced 2024-10-01 06:05:20 +00:00
Merge branch 'jh/sparse-index-expand-to-path-fix'
A caller called index_file_exists() that takes a string expressed as <ptr, length> with a wrong length, which has been corrected. * jh/sparse-index-expand-to-path-fix: sparse-index: pass string length to index_file_exists()
This commit is contained in:
commit
294dd2057c
|
@ -579,8 +579,9 @@ void expand_to_path(struct index_state *istate,
|
||||||
replace++;
|
replace++;
|
||||||
temp = *replace;
|
temp = *replace;
|
||||||
*replace = '\0';
|
*replace = '\0';
|
||||||
|
substr_len = replace - path_mutable.buf;
|
||||||
if (index_file_exists(istate, path_mutable.buf,
|
if (index_file_exists(istate, path_mutable.buf,
|
||||||
path_mutable.len, icase)) {
|
substr_len, icase)) {
|
||||||
/*
|
/*
|
||||||
* We found a parent directory in the name-hash
|
* We found a parent directory in the name-hash
|
||||||
* hashtable, because only sparse directory entries
|
* hashtable, because only sparse directory entries
|
||||||
|
@ -593,7 +594,6 @@ void expand_to_path(struct index_state *istate,
|
||||||
}
|
}
|
||||||
|
|
||||||
*replace = temp;
|
*replace = temp;
|
||||||
substr_len = replace - path_mutable.buf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
Loading…
Reference in a new issue