summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab22707)
raw | patch | inline | side by side (parent: ab22707)
author | Linus Torvalds <torvalds@osdl.org> | |
Wed, 24 Aug 2005 00:14:13 +0000 (17:14 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 25 Aug 2005 01:53:29 +0000 (18:53 -0700) |
The "verify_pathspec()" function doesn't test for ending NUL character in
the pathspec, causing some really funky and unexpected behaviour. It just
happened to work in the cases I had tested.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
the pathspec, causing some really funky and unexpected behaviour. It just
happened to work in the cases I had tested.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
ls-files.c | patch | blob | history |
diff --git a/ls-files.c b/ls-files.c
index 2c7aada88cc582dfee7ba19d1e6ae717e23d8e03..e53d245884ab14f85824fd6c1b891481c8b1f849 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
char c = n[i];
if (prev && prev[i] != c)
break;
- if (c == '*' || c == '?')
+ if (!c || c == '*' || c == '?')
break;
if (c == '/')
len = i+1;