Re: [perl #34568] Perl crashes reading past the end of a heap block while parsing...
Gurusamy Sarathy [Fri, 25 Mar 2005 10:31:09 +0000 (02:31 -0800)]
Message-Id: <200503251831.j2PIV9A6006234@smtp3.ActiveState.com>

p4raw-id: //depot/perl@24080

op.c

diff --git a/op.c b/op.c
index a1542f3..08dc657 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3925,7 +3925,6 @@ Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *blo
         expr = mod(force_list(expr), OP_GREPSTART);
     }
 
-
     loop = (LOOP*)list(convert(OP_ENTERITER, iterflags,
                               append_elem(OP_LIST, expr, scalar(sv))));
     assert(!loop->op_next);
@@ -3936,7 +3935,7 @@ Perl_newFOROP(pTHX_ I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *blo
     {
        LOOP *tmp;
        NewOp(1234,tmp,1,LOOP);
-       Copy(loop,tmp,1,LOOP);
+       Copy(loop,tmp,1,LISTOP);
        FreeOp(loop);
        loop = tmp;
     }