This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
assert min identifier length in S_pending_ident()
authorZefram <zefram@fysh.org>
Fri, 8 Dec 2017 00:03:16 +0000 (00:03 +0000)
committerZefram <zefram@fysh.org>
Fri, 8 Dec 2017 00:06:48 +0000 (00:06 +0000)
toke.c

diff --git a/toke.c b/toke.c
index 5aeec6f..a4150c2 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -8943,6 +8943,7 @@ S_pending_ident(pTHX)
 
     DEBUG_T({ PerlIO_printf(Perl_debug_log,
           "### Pending identifier '%s'\n", PL_tokenbuf); });
+    assert(tokenbuf_len >= 2);
 
     /* if we're in a my(), we can't allow dynamics here.
        $foo'bar has already been turned into $foo::bar, so