/[pcre]/code/tags/pcre-8.33/pcre_compile.c
ViewVC logotype

Diff of /code/tags/pcre-8.33/pcre_compile.c

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

revision 758 by ph10, Mon Nov 21 12:05:36 2011 UTC revision 760 by ph10, Tue Nov 22 11:23:43 2011 UTC
# Line 413  static const char error_texts[] = Line 413  static const char error_texts[] =
413    /* 70 */    /* 70 */
414    "internal error: unknown opcode in find_fixedlength()\0"    "internal error: unknown opcode in find_fixedlength()\0"
415    "\\N is not supported in a class\0"    "\\N is not supported in a class\0"
416      "too many forward references\0"
417    ;    ;
418    
419  /* Table to identify digits and hex digits. This is used when compiling  /* Table to identify digits and hex digits. This is used when compiling
# Line 4895  for (;; ptr++) Line 4896  for (;; ptr++)
4896                memcpy(code, previous, len);                memcpy(code, previous, len);
4897                for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)                for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
4898                  {                  {
4899                    if (cd->hwm >= cd->start_workspace + WORK_SIZE_CHECK)
4900                      {
4901                      *errorcodeptr = ERR72;
4902                      goto FAILED;
4903                      }
4904                  PUT(cd->hwm, 0, GET(hc, 0) + len);                  PUT(cd->hwm, 0, GET(hc, 0) + len);
4905                  cd->hwm += LINK_SIZE;                  cd->hwm += LINK_SIZE;
4906                  }                  }
# Line 4922  for (;; ptr++) Line 4928  for (;; ptr++)
4928          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
4929          paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is          paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is
4930          a 64-bit integer type when available, otherwise double. */          a 64-bit integer type when available, otherwise double. */
4931    
4932          if (lengthptr != NULL && repeat_max > 0)          if (lengthptr != NULL && repeat_max > 0)
4933            {            {
4934            int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*LINK_SIZE) -            int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*LINK_SIZE) -
# Line 4962  for (;; ptr++) Line 4968  for (;; ptr++)
4968            memcpy(code, previous, len);            memcpy(code, previous, len);
4969            for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)            for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
4970              {              {
4971                if (cd->hwm >= cd->start_workspace + WORK_SIZE_CHECK)
4972                  {
4973                  *errorcodeptr = ERR72;
4974                  goto FAILED;
4975                  }
4976              PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));              PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));
4977              cd->hwm += LINK_SIZE;              cd->hwm += LINK_SIZE;
4978              }              }
# Line 5977  for (;; ptr++) Line 5988  for (;; ptr++)
5988                /* Fudge the value of "called" so that when it is inserted as an                /* Fudge the value of "called" so that when it is inserted as an
5989                offset below, what it actually inserted is the reference number                offset below, what it actually inserted is the reference number
5990                of the group. Then remember the forward reference. */                of the group. Then remember the forward reference. */
5991    
5992                called = cd->start_code + recno;                called = cd->start_code + recno;
5993                  if (cd->hwm >= cd->start_workspace + WORK_SIZE_CHECK)
5994                    {
5995                    *errorcodeptr = ERR72;
5996                    goto FAILED;
5997                    }
5998                PUTINC(cd->hwm, 0, (int)(code + 1 - cd->start_code));                PUTINC(cd->hwm, 0, (int)(code + 1 - cd->start_code));
5999                }                }
6000    

Legend:
Removed from v.758  
changed lines
  Added in v.760

  ViewVC Help
Powered by ViewVC 1.1.5