This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1621fc
)
Stop csh_glob from reading past end of string
author
Father Chrysostomos
<sprout@cpan.org>
Thu, 27 Oct 2011 21:31:13 +0000
(14:31 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Thu, 27 Oct 2011 21:32:53 +0000
(14:32 -0700)
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
patch
|
blob
|
blame
|
history
diff --git
a/ext/File-Glob/Glob.xs
b/ext/File-Glob/Glob.xs
index
c055d1b
..
030e827
100644
(file)
--- 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,