From: Steve Peters Date: Sat, 11 Mar 2006 22:08:34 +0000 (+0000) Subject: Perl_newWHILEOP() had exactly the same lack of a NULL pointer check X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=72c8de1ace969ce661556df13526a4e7e1d7eb93;p=p5sagit%2Fp5-mst-13.2.git Perl_newWHILEOP() had exactly the same lack of a NULL pointer check that Perl_newLOOPOP() had and fixed in change #27476. Maybe some refactoring is needed? p4raw-link: @27476 on //depot/perl: 06dc7ac6fa597f9446b4a27a32d667bbcbde0453 p4raw-id: //depot/perl@27477 --- diff --git a/op.c b/op.c index 51f962a..9a5dfb1 100644 --- a/op.c +++ b/op.c @@ -4299,10 +4299,10 @@ whileline, OP *expr, OP *block, OP *cont, I32 has_my) break; case OP_SASSIGN: - if (k1->op_type == OP_READDIR + if (k1 && (k1->op_type == OP_READDIR || k1->op_type == OP_GLOB || (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB) - || k1->op_type == OP_EACH) + || k1->op_type == OP_EACH)) expr = newUNOP(OP_DEFINED, 0, expr); break; }