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 | f2c3c2b138051ac43fa7bf09f6df22a716145c94 (patch) | |
tree | d3a173b0ef63342d042d4082a467b71e0c32401f /toke.c | |
parent | 5a3d019e6f0e42ddac00be4c2d4be330302b31d7 (diff) | |
download | perl-f2c3c2b138051ac43fa7bf09f6df22a716145c94.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 = |