summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-02-08 20:24:15 -0800
committerFather Chrysostomos <sprout@cpan.org>2015-02-08 20:24:15 -0800
commit1f7c3e7c639e9586a88d4bfb034a8ff37d2b2cce (patch)
tree7ccddc7ed43a6645db6c1084a0ddfb86ea4537a1 /toke.c
parentba511db061a88439acb528a66c780ab574bb4fb0 (diff)
downloadperl-1f7c3e7c639e9586a88d4bfb034a8ff37d2b2cce.tar.gz
toke.c: Assert that we don’t overflow token stack
With this assertion, the test case from #123743 fails sooner.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index 388b272442..2df773299e 100644
--- a/toke.c
+++ b/toke.c
@@ -1907,6 +1907,7 @@ S_force_next(pTHX_ I32 type)
tokereport(type, &NEXTVAL_NEXTTOKE);
}
#endif
+ assert(PL_nexttoke < C_ARRAY_LENGTH(PL_nexttype));
PL_nexttype[PL_nexttoke] = type;
PL_nexttoke++;
if (PL_lex_state != LEX_KNOWNEXT) {