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:
7b44355
)
toke.c: Add assertion
author
Karl Williamson
<khw@cpan.org>
Wed, 10 Apr 2019 18:54:30 +0000
(12:54 -0600)
committer
Karl Williamson
<khw@cpan.org>
Wed, 10 Apr 2019 19:44:24 +0000
(13:44 -0600)
toke.c
patch
|
blob
|
blame
|
history
diff --git
a/toke.c
b/toke.c
index
5477662
..
3add418
100644
(file)
--- a/
toke.c
+++ b/
toke.c
@@
-2965,6
+2965,11
@@
S_scan_const(pTHX_ char *start)
ENTER_with_name("scan_const");
SAVEFREESV(sv);
+ /* A bunch of code in the loop below assumes that if s[n] exists and is not
+ * NUL, then s[n+1] exists. This assertion makes sure that assumption is
+ * valid */
+ assert(*send == '\0');
+
while (s < send
|| dorange /* Handle tr/// range at right edge of input */
) {