diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-10-29 20:37:31 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-10-29 20:37:31 +0000 |
commit | 904d85c5b9ccc833788234557fda3bc74a77ca8b (patch) | |
tree | d3a173b0ef63342d042d4082a467b71e0c32401f /toke.c | |
parent | b8370f2a62ce28c9808787355d168ac28a1aaa1c (diff) | |
download | perl-904d85c5b9ccc833788234557fda3bc74a77ca8b.tar.gz |
Partial fix of bug [perl #17589] : prevent the parser to
segfault when encountering the erroneous construct "sub;".
p4raw-id: //depot/perl@18072
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -5057,6 +5057,8 @@ Perl_yylex(pTHX) if (*s == ':' && s[1] != ':') PL_expect = attrful; + else if (!have_name && *s != '{' && key == KEY_sub) + Perl_croak(aTHX_ "Illegal declaration of anonymous subroutine"); if (have_proto) { PL_nextval[PL_nexttoke].opval = |