summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-10-27 14:31:13 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-27 14:32:53 -0700
commitf89f9e938998e1102fa66a8d28a2d0fe8b40765c (patch)
treecbf040eedf3bd0fb9f0dc4cb0b8c9ae6c3c4aea8
parente1621fc96189270d9aa78c1f2dbc2200bd15cb59 (diff)
downloadperl-f89f9e938998e1102fa66a8d28a2d0fe8b40765c.tar.gz
Stop csh_glob from reading past end of string
It was reading one byte too far, and looking at the trailing null. This happened only in the case of an unmatched quote.
-rw-r--r--ext/File-Glob/Glob.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/File-Glob/Glob.xs b/ext/File-Glob/Glob.xs
index c055d1ba2f..030e827c0a 100644
--- a/ext/File-Glob/Glob.xs
+++ b/ext/File-Glob/Glob.xs
@@ -132,7 +132,7 @@ csh_glob(pTHX)
}
if (piece) sv_catpvn(word, piece, s-piece);
piece = s+1;
- while (++s <= patend)
+ while (++s < patend)
if (*s == '\\') {
s++;
/* If the backslash is here to escape a quote,