diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2009-04-20 19:44:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-20 13:44:14 -0700 |
commit | 7183c09d11ac4b98f1cc78f29dcbd85df5533001 (patch) | |
tree | bc5d434c42ae7f87f2ab628be8cb4a99012352cb | |
parent | GIT 1.6.2.4 (diff) | |
download | tgif-7183c09d11ac4b98f1cc78f29dcbd85df5533001.tar.xz |
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>
-rw-r--r-- | tree.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |