diff options
author | Dominic Dunlop <domo@computer.org> | 1998-09-29 21:06:30 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-02 02:52:21 +0000 |
commit | 17feb5d536e7c1a1b75d6e8e85a12d67b3d41c04 (patch) | |
tree | 89e174fd557200f21db7ac1b39398734009641a0 /regcomp.c | |
parent | d866897654588261ed8733ce10685e509cc36fb5 (diff) | |
download | perl-17feb5d536e7c1a1b75d6e8e85a12d67b3d41c04.tar.gz |
document yet another RE diagnostic, make it consistent with REG_INFTY
Date: Tue, 29 Sep 1998 21:06:30 +0000
Message-Id: <v03110700b236f60b1375@[212.24.192.106]>
Subject: [PATCH 5.005_52] Fix hard-coded "matches null string many times" limit
--
Date: Wed, 30 Sep 1998 11:46:44 +0000
Message-Id: <v03110702b237beb04830@[212.24.192.74]>
Subject: [PATCH 5.005_52] Add "Strange *+?{} ..." to perldiag
p4raw-id: //depot/perl@1911
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -493,7 +493,7 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32 scan = next; if (ckWARN(WARN_UNSAFE) && (minnext + deltanext == 0) && !(data->flags & (SF_HAS_PAR|SF_IN_PAR)) - && maxcount <= 10000) /* Complement check for big count */ + && maxcount <= REG_INFTY/3) /* Complement check for big count */ warner(WARN_UNSAFE, "Strange *+?{} on zero-length expression"); min += minnext * mincount; is_inf_internal |= (maxcount == REG_INFTY @@ -1586,7 +1586,7 @@ regpiece(I32 *flagp) goto do_curly; } nest_check: - if (ckWARN(WARN_UNSAFE) && !SIZE_ONLY && !(flags&HASWIDTH) && max > 10000) { + if (ckWARN(WARN_UNSAFE) && !SIZE_ONLY && !(flags&HASWIDTH) && max > REG_INFTY/3) { warner(WARN_UNSAFE, "%.*s matches null string many times", PL_regcomp_parse - origparse, origparse); } |