This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: 5.004_65 uninitialized variable regexec.c (2)
authorIlya Zakharevich <ilya@math.berkeley.edu>
Thu, 28 May 1998 01:28:54 +0000 (21:28 -0400)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 10 Jun 1998 06:55:20 +0000 (06:55 +0000)
p4raw-id: //depot/perl@1101

regexec.c

index a38e97d..ac9f37b 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1283,7 +1283,7 @@ regmatch(regnode *prog)
                minmod = 0;
                if (ln && regrepeat_hard(scan, ln, &l) < ln)
                    sayNO;
-               if (l == 0 && n >= ln
+               if (ln && l == 0 && n >= ln
                    /* In fact, this is tricky.  If paren, then the
                       fact that we did/didnot match may influence
                       future execution. */
@@ -1301,6 +1301,7 @@ regmatch(regnode *prog)
                } else
                    c1 = c2 = -1000;
                REGCP_SET;
+               /* This may be improved if l == 0.  */
                while (n >= ln || (n == REG_INFTY && ln > 0 && l)) { /* ln overflow ? */
                    /* If it could work, try it. */
                    if (c1 == -1000 ||