зеркало из https://github.com/microsoft/git.git
Fix off-by-one in read_tree_recursive
Found by valgrind. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
1f9b620fdb
Коммит
7183c09d11
1
tree.c
1
tree.c
|
@ -62,6 +62,7 @@ static int match_tree_entry(const char *base, int baselen, const char *path, uns
|
|||
continue;
|
||||
/* pathspecs match only at the directory boundaries */
|
||||
if (!matchlen ||
|
||||
baselen == matchlen ||
|
||||
base[matchlen] == '/' ||
|
||||
match[matchlen - 1] == '/')
|
||||
return 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче