Skip to content

Commit 087dc7f

Browse files
committed
S_parse_ident: Add assertion
The source to parse must be in the buffer terminated at PL_bufend. This was not obvious to me; this assertion would have caught my error earlier.
1 parent c2a46f9 commit 087dc7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

toke.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10470,6 +10470,7 @@ S_parse_ident(pTHX_ char **s, char **d, char * const e, int allow_package,
1047010470
bool is_utf8, bool check_dollar)
1047110471
{
1047210472
PERL_ARGS_ASSERT_PARSE_IDENT;
10473+
assert(*s <= PL_bufend);
1047310474

1047410475
while (*s < PL_bufend) {
1047510476
if (*d >= e)

0 commit comments

Comments
 (0)