summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-10-17 14:32:41 +1100
committerTony Cook <tony@develop-help.com>2016-10-17 14:32:41 +1100
commit4eadd82f8c152034818f42956737102f674f9118 (patch)
treec52acfc746cd735369880a77d18ad39d2b6a08b8 /op.c
parent87af8d55d30dca849a4094c502ad2d067745049f (diff)
downloadperl-4eadd82f8c152034818f42956737102f674f9118.tar.gz
(perl #128996) prevent PL_op pointing to freed ops
When yylex() attempts to report a UTF-8 encoding error, it indirectly accesses PL_op, this would cause an access to freed memory if the CV containing that op (and the op itself) had been freed.
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/op.c b/op.c
index 697faa70ea..1866632594 100644
--- a/op.c
+++ b/op.c
@@ -853,10 +853,8 @@ Perl_op_free(pTHX_ OP *o)
op_clear(o);
FreeOp(o);
-#ifdef DEBUG_LEAKING_SCALARS
if (PL_op == o)
PL_op = NULL;
-#endif
} while ( (o = POP_DEFERRED_OP()) );
Safefree(defer_stack);