From: Hugo van der Sanden Date: Wed, 3 Apr 2002 03:34:34 +0000 (+0100) Subject: Re: [ID 20020311.008] "foo bar" =~ /^(\w+)\s+(.+)(\s+)?$(\s)/ core dumps X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9051bda5fd91fe892f07739193136fd0977aa074;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20020311.008] "foo bar" =~ /^(\w+)\s+(.+)(\s+)?$(\s)/ core dumps Message-Id: <200204030234.g332YYP15141@crypt.compulink.co.uk> p4raw-id: //depot/perl@15708 --- diff --git a/regcomp.c b/regcomp.c index 43c46bb..6726ba1 100644 --- a/regcomp.c +++ b/regcomp.c @@ -505,6 +505,8 @@ S_scan_commit(pTHX_ RExC_state_t *pRExC_state, scan_data_t *data) data->offset_float_max = (l ? data->last_start_max : data->pos_min + data->pos_delta); + if ((U32)data->offset_float_max > (U32)I32_MAX) + data->offset_float_max = I32_MAX; if (data->flags & SF_BEFORE_EOL) data->flags |= ((data->flags & SF_BEFORE_EOL) << SF_FL_SHIFT_EOL);