diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-08-26 11:11:07 +0300 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-26 05:18:15 +0000 |
commit | e994fd663a4d8acc8c717fa28479d849341d1bb4 (patch) | |
tree | 5ce0bae519b646c868fa25a6fb71d9885a19e0af /regcomp.c | |
parent | 397cf4b72b64bab2d81c27006b39549ca667b5a8 (diff) | |
download | perl-e994fd663a4d8acc8c717fa28479d849341d1bb4.tar.gz |
Re: [PATCH] valgrind and /#/x
Message-ID: <20030826051107.GA1086@ratsnest.hole>
p4raw-id: //depot/perl@20901
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4272,8 +4272,11 @@ S_nextchar(pTHX_ RExC_state_t *pRExC_state) for (;;) { if (*RExC_parse == '(' && RExC_parse[1] == '?' && RExC_parse[2] == '#') { - while (*RExC_parse && *RExC_parse != ')') + while (*RExC_parse != ')') { + if (RExC_parse == RExC_end) + FAIL("Sequence (?#... not terminated"); RExC_parse++; + } RExC_parse++; continue; } @@ -4283,10 +4286,8 @@ S_nextchar(pTHX_ RExC_state_t *pRExC_state) continue; } else if (*RExC_parse == '#') { - while (*RExC_parse && *RExC_parse != '\n') - RExC_parse++; - if (*RExC_parse) - RExC_parse++; + while (RExC_parse < RExC_end) + if (*RExC_parse++ == '\n') break; continue; } } |