/[pcre]/code/trunk/pcre_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_compile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 483 by ph10, Mon Jan 4 16:19:17 2010 UTC revision 487 by ph10, Wed Jan 6 10:26:55 2010 UTC
# Line 1997  could_be_empty(const uschar *code, const Line 1997  could_be_empty(const uschar *code, const
1997  {  {
1998  while (bcptr != NULL && bcptr->current_branch >= code)  while (bcptr != NULL && bcptr->current_branch >= code)
1999    {    {
2000    if (!could_be_empty_branch(bcptr->current_branch, endcode, utf8))    if (!could_be_empty_branch(bcptr->current_branch, endcode, utf8))
2001      return FALSE;      return FALSE;
2002    bcptr = bcptr->outer;    bcptr = bcptr->outer;
2003    }    }
# Line 4222  we set the flag only if there is a liter Line 4222  we set the flag only if there is a liter
4222              {              {
4223              int delta = (repeat_min - 1)*length_prevgroup;              int delta = (repeat_min - 1)*length_prevgroup;
4224              if ((INT64_OR_DOUBLE)(repeat_min - 1)*              if ((INT64_OR_DOUBLE)(repeat_min - 1)*
4225                    (INT64_OR_DOUBLE)length_prevgroup >                    (INT64_OR_DOUBLE)length_prevgroup >
4226                      (INT64_OR_DOUBLE)INT_MAX ||                      (INT64_OR_DOUBLE)INT_MAX ||
4227                  OFLOW_MAX - *lengthptr < delta)                  OFLOW_MAX - *lengthptr < delta)
4228                {                {
# Line 4269  we set the flag only if there is a liter Line 4269  we set the flag only if there is a liter
4269          just adjust the length as if we had. For each repetition we must add 1          just adjust the length as if we had. For each repetition we must add 1
4270          to the length for BRAZERO and for all but the last repetition we must          to the length for BRAZERO and for all but the last repetition we must
4271          add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some          add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some
4272          paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is          paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is
4273          a 64-bit integer type when available, otherwise double. */          a 64-bit integer type when available, otherwise double. */
4274    
4275          if (lengthptr != NULL && repeat_max > 0)          if (lengthptr != NULL && repeat_max > 0)

Legend:
Removed from v.483  
changed lines
  Added in v.487

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12