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

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

Hugo van der Sanden via RT
November 25, 2016 12:10
[perl #129347] null pointer deref S_ft_return_false (pp_sys.c:3036)
Message ID:
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.

--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3046,7 +3046,7 @@ S_ft_return_false(pTHX_ SV *ret) {
     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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About