develooper Front page | perl.perl5.porters | Postings from November 2016

[perl #129347] null pointer deref S_ft_return_false (pp_sys.c:3036)

From:
Hugo van der Sanden via RT
Date:
November 25, 2016 12:10
Subject:
[perl #129347] null pointer deref S_ft_return_false (pp_sys.c:3036)
Message ID:
rt-4.0.24-19704-1480075848-120.129347-15-0@perl.org
This crashes because PL_op->op_next->op_next is NULL; I'm not sure if it's correct for it to be so (I don't see that for the vaguely analagous case of a map block) - if that is expected, the patch below is enough to fix it.

Hugo
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3046,7 +3046,7 @@ S_ft_return_false(pTHX_ SV *ret) {
     PUTBACK;
 
     if (PL_op->op_private & OPpFT_STACKING) {
-        while (OP_IS_FILETEST(next->op_type)
+        while (next && OP_IS_FILETEST(next->op_type)
                && next->op_private & OPpFT_STACKED)
             next = next->op_next;
     }


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=129347



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About