Re: [ID 20020311.008] "foo bar" =~ /^(\w+)\s+(.+)(\s+)?$(\s)/ core dumps
authorHugo van der Sanden <hv@crypt.org>
Wed, 3 Apr 2002 03:34:34 +0000 (04:34 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 3 Apr 2002 15:01:51 +0000 (15:01 +0000)
Message-Id: <200204030234.g332YYP15141@crypt.compulink.co.uk>

p4raw-id: //depot/perl@15708

regcomp.c

index 43c46bb..6726ba1 100644 (file)
--- 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);