From f89f9e938998e1102fa66a8d28a2d0fe8b40765c Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 27 Oct 2011 14:31:13 -0700 Subject: 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. --- ext/File-Glob/Glob.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v1.2.1