From: Gurusamy Sarathy Date: Fri, 25 Mar 2005 10:31:09 +0000 (-0800) Subject: Re: [perl #34568] Perl crashes reading past the end of a heap block while parsing... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd5f3bc473acbb69a352d57b0baf5d694577ad8e;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #34568] Perl crashes reading past the end of a heap block while parsing foreach statement Message-Id: <200503251831.j2PIV9A6006234@smtp3.ActiveState.com> p4raw-id: //depot/perl@24080 --- diff --git a/op.c b/op.c index a1542f3..08dc657 100644 --- 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; }