Skip to contentSkip to conversation

valgrind

PATCH In review Andy Lester 3 participants 5 messages Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 Fix off-by-one in read_tree_recursive

Found by valgrind.

---
 tree.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tree.c +1 -0
index 0d703a0..5ab90af 100644
@@ -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;
Signature · 1 line
1.6.2.1.493.g67cf3
#2 lore raw
Quoted 1 line · Johannes Schindelin

Found by valgrind.

How are you running valgrind? Do you have a test suite for it? A make target?

xoa

--
Andy Lester => [email protected] => www.theworkinggeek.com => AIM:petdance