diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2016-02-06 19:50:33 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2016-02-07 08:23:46 -0500 |
commit | ab65fd1a46259a8e942fd65724ad269ebda72919 (patch) | |
tree | c6b1168ca52a31bdc0389bba5ae446ba492b62e4 | |
parent | ea8da35cc190a817cc6f856224152c42806ec814 (diff) | |
download | perl-ab65fd1a46259a8e942fd65724ad269ebda72919.tar.gz |
assert(PL_parser)
Coverity CID 135144: Dereference after null check (FORWARD_NULL)
Earlier, pp.c:8254-ish, PL_parser is tested against NULL, so it
presumably can be NULL.
-rw-r--r-- | op.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8393,6 +8393,7 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, : NULL; if (block) { + assert(PL_parser); /* This makes sub {}; work as expected. */ if (block->op_type == OP_STUB) { const line_t l = PL_parser->copline; |