srclib/pcre/pcre.c:5345: error: UNINITIALIZED_VALUE
  The value read from bralenstack[_] was never initialized.

srclib/pcre/pcre.c:5345:7: 
5343.       {
5344.       duplength = length - brastack[--brastackptr];
5345.       branch_extra = bralenstack[brastackptr];
            ^
5346.       }
5347.     else duplength = 0;

pcre *
pcre_compile(const char *pattern, int options, const char **errorptr,
  int *erroroffset, const unsigned char *tables)
{
real_pcre *re;
int length = 1 + LINK_SIZE;
int c, firstbyte, reqbyte;
int bracount = 0;
int branch_extra = 0;
int branch_newextra;
int item_count = -1;
int name_count = 0;
int max_name_size = 0;
int lastitemlength = 0;
#ifdef SUPPORT_UTF8
BOOL utf8;
BOOL class_utf8;
#endif
BOOL inescq = FALSE;
unsigned int brastackptr = 0;
size_t size;
uschar *code;
const uschar *codestart;
const uschar *ptr;
compile_data compile_block;
int brastack[BRASTACK_SIZE];
uschar bralenstack[BRASTACK_SIZE];
if (errorptr == NULL) return NULL;
*errorptr = NULL;
if (erroroffset == NULL)
  {
  *errorptr = ERR16;
  return NULL;
  }
*erroroffset = 0;
#ifdef SUPPORT_UTF8
utf8 = (options & PCRE_UTF8) != 0;
if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 &&
     (*erroroffset = valid_utf8((uschar *)pattern, -1)) >= 0)
  {
  *errorptr = ERR44;
  return NULL;
  }
#else
if ((options & PCRE_UTF8) != 0)
  {
  *errorptr = ERR32;
  return NULL;
  }
#endif
if ((options & ~PUBLIC_OPTIONS) != 0)
  {
  *errorptr = ERR17;
  return NULL;
  }
if (tables == NULL) tables = pcre_default_tables;
compile_block.lcc = tables + lcc_offset;
compile_block.fcc = tables + fcc_offset;
compile_block.cbits = tables + cbits_offset;
compile_block.ctypes = tables + ctypes_offset;
compile_block.top_backref = 0;
compile_block.backref_map = 0;
DPRINTF(("------------------------------------------------------------------\n"));
DPRINTF(("%s\n", pattern));
ptr = (const uschar *)(pattern - 1);
while ((c = *(++ptr)) != 0)
  {
  int min, max;
  int class_optcount;
  int bracket_length;
  int duplength;
  if (inescq)
    {
    if ((options & PCRE_AUTO_CALLOUT) != 0) length += 2 + 2*LINK_SIZE;
    goto NORMAL_CHAR;
    }
  if ((options & PCRE_EXTENDED) != 0)
    {
    if ((compile_block.ctypes[c] & ctype_space) != 0) continue;
    if (c == '#')
      {
      while ((c = *(++ptr)) != 0 && c != NEWLINE) ;
      if (c == 0) break;
      continue;
      }
    }
  item_count++;
  if ((options & PCRE_AUTO_CALLOUT) != 0 &&
       c != '*' && c != '+' && c != '?' &&
       (c != '{' || !is_counted_repeat(ptr + 1)))
    length += 2 + 2*LINK_SIZE;
  switch(c)
    {
    case '\\':
    c = check_escape(&ptr, errorptr, bracount, options, FALSE);
    if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
    lastitemlength = 1;
    if (c >= 0)
      {
      length += 2;
#ifdef SUPPORT_UTF8
      if (utf8 && c > 127)
        {
        int i;
        for (i = 0; i < sizeof(utf8_table1)/sizeof(int); i++)
          if (c <= utf8_table1[i]) break;
        length += i;
        lastitemlength += i;
        }
#endif
      continue;
      }
    if (-c == ESC_Q)
      {
      inescq = TRUE;
      continue;
      }
#ifndef SUPPORT_UCP
    if (-c == ESC_X)
      {
      *errorptr = ERR45;
      goto PCRE_ERROR_RETURN;
      }
#endif
    else if (-c == ESC_P || -c == ESC_p)
      {
#ifdef SUPPORT_UCP
      BOOL negated;
      length += 2;
      lastitemlength = 2;
      if (get_ucp(&ptr, &negated, errorptr) < 0) goto PCRE_ERROR_RETURN;
      continue;
#else
      *errorptr = ERR45;
      goto PCRE_ERROR_RETURN;
#endif
      }
    length++;
    if (c <= -ESC_REF)
      {
      int refnum = -c - ESC_REF;
      compile_block.backref_map |= (refnum < 32)? (1 << refnum) : 1;
      if (refnum > compile_block.top_backref)
        compile_block.top_backref = refnum;
      length += 2;
      if (ptr[1] == '{' && is_counted_repeat(ptr+2))
        {
        ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);
        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
        if ((min == 0 && (max == 1 || max == -1)) ||
          (min == 1 && max == -1))
            length++;
        else length += 5;
        if (ptr[1] == '?') ptr++;
        }
      }
    continue;
    case '^':
    case '.':
    case '$':
    length++;
    lastitemlength = 1;
    continue;
    case '*':
    case '+':
    case '?':
    length++;
    goto POSESSIVE;
    case '{':
    if (!is_counted_repeat(ptr+1)) goto NORMAL_CHAR;
    ptr = read_repeat_counts(ptr+1, &min, &max, errorptr);
    if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
    if ((min == 0 && (max == 1 || max == -1)) ||
      (min == 1 && max == -1))
        length++;
    else
      {
      if (min != 1)
        {
        length -= lastitemlength;
        if (min > 0) length += 3 + lastitemlength;
        }
      length += lastitemlength + ((max > 0)? 3 : 1);
      }
    if (ptr[1] == '?') ptr++;
    POSESSIVE:
    if (ptr[1] == '+')
      {
      ptr++;
      length += 2 + 2*LINK_SIZE;
      }
    continue;
    case '|':
    length += 1 + LINK_SIZE + branch_extra;
    continue;
    case '[':
    if (*(++ptr) == '^')
      {
      class_optcount = 10;
      ptr++;
      }
    else class_optcount = 0;
#ifdef SUPPORT_UTF8
    class_utf8 = FALSE;
#endif
    if (*ptr != 0) do
      {
      if (inescq)
        {
        if (*ptr != '\\' || ptr[1] != 'E') goto GET_ONE_CHARACTER;
        inescq = FALSE;
        ptr += 1;
        continue;
        }
      if (*ptr == '\\')
        {
        c = check_escape(&ptr, errorptr, bracount, options, TRUE);
        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
        if (-c == ESC_b) c = '\b';
        else if (-c == ESC_X) c = 'X';
        else if (-c == ESC_Q)
          {
          inescq = TRUE;
          continue;
          }
        if (c >= 0) goto NON_SPECIAL_CHARACTER;
        else
          {
          class_optcount = 10;
#ifdef SUPPORT_UTF8
          if (-c == ESC_p || -c == ESC_P)
            {
            if (!class_utf8)
              {
              class_utf8 = TRUE;
              length += LINK_SIZE + 2;
              }
            length += 2;
            }
#endif
          }
        }
      else if (*ptr == '[' && check_posix_syntax(ptr, &ptr, &compile_block))
        {
        ptr++;
        class_optcount = 10;
        }
      else
        {
        int d;
        GET_ONE_CHARACTER:
#ifdef SUPPORT_UTF8
        if (utf8)
          {
          int extra = 0;
          GETCHARLEN(c, ptr, extra);
          ptr += extra;
          }
        else c = *ptr;
#else
        c = *ptr;
#endif
        NON_SPECIAL_CHARACTER:
        class_optcount++;
        d = -1;
        if (ptr[1] == '-')
          {
          uschar const *hyptr = ptr++;
          if (ptr[1] == '\\')
            {
            ptr++;
            d = check_escape(&ptr, errorptr, bracount, options, TRUE);
            if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
            if (-d == ESC_b) d = '\b';
            else if (-d == ESC_X) d = 'X';
            }
          else if (ptr[1] != 0 && ptr[1] != ']')
            {
            ptr++;
#ifdef SUPPORT_UTF8
            if (utf8)
              {
              int extra = 0;
              GETCHARLEN(d, ptr, extra);
              ptr += extra;
              }
            else
#endif
            d = *ptr;
            }
          if (d < 0) ptr = hyptr;
          }
        if (d >= 0)
          {
          class_optcount = 10;
          if (d < c)
            {
            *errorptr = ERR8;
            goto PCRE_ERROR_RETURN;
            }
#ifdef SUPPORT_UTF8
          if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))
            {
            uschar buffer[6];
            if (!class_utf8)
              {
              class_utf8 = TRUE;
              length += LINK_SIZE + 2;
              }
#ifdef SUPPORT_UCP
            if ((options & PCRE_CASELESS) != 0)
              {
              int occ, ocd;
              int cc = c;
              int origd = d;
              while (get_othercase_range(&cc, origd, &occ, &ocd))
                {
                if (occ >= c && ocd <= d) continue;
                if (occ < c  && ocd >= c - 1)
                  {
                  c = occ;
                  continue;
                  }
                if (ocd > d && occ <= d + 1)
                  {
                  d = ocd;
                  continue;
                  }
                length += 1 + ord2utf8(occ, buffer) +
                  ((occ == ocd)? 0 : ord2utf8(ocd, buffer));
                }
              }
#endif
            length += 1 + ord2utf8(c, buffer) + ord2utf8(d, buffer);
            }
#endif
          }
        else
          {
#ifdef SUPPORT_UTF8
          if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))
            {
            uschar buffer[6];
            class_optcount = 10;
            if (!class_utf8)
              {
              class_utf8 = TRUE;
              length += LINK_SIZE + 2;
              }
#ifdef SUPPORT_UCP
            length += (((options & PCRE_CASELESS) != 0)? 2 : 1) *
              (1 + ord2utf8(c, buffer));
#else
            length += 1 + ord2utf8(c, buffer);
#endif
            }
#endif
          }
        }
      }
    while (*(++ptr) != 0 && (inescq || *ptr != ']'));
    if (*ptr == 0)
      {
      *errorptr = ERR6;
      goto PCRE_ERROR_RETURN;
      }
    if (class_optcount == 1) length += 3; else
      {
      length += 33;
      if (*ptr != 0 && ptr[1] == '{' && is_counted_repeat(ptr+2))
        {
        ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);
        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
        if ((min == 0 && (max == 1 || max == -1)) ||
          (min == 1 && max == -1))
            length++;
        else length += 5;
        if (ptr[1] == '+')
          {
          ptr++;
          length += 2 + 2*LINK_SIZE;
          }
        else if (ptr[1] == '?') ptr++;
        }
      }
    continue;
    case '(':
    branch_newextra = 0;
    bracket_length = 1 + LINK_SIZE;
    if (ptr[1] == '?')
      {
      int set, unset;
      int *optset;
      switch (c = ptr[2])
        {
        case '#':
        ptr += 3;
        while (*ptr != 0 && *ptr != ')') ptr++;
        if (*ptr == 0)
          {
          *errorptr = ERR18;
          goto PCRE_ERROR_RETURN;
          }
        continue;
        case ':':
        case '=':
        case '!':
        case '>':
        ptr += 2;
        break;
        case 'R':
        ptr++;
        case '0': case '1': case '2': case '3': case '4':
        case '5': case '6': case '7': case '8': case '9':
        ptr += 2;
        if (c != 'R')
          while ((digitab[*(++ptr)] & ctype_digit) != 0);
        if (*ptr != ')')
          {
          *errorptr = ERR29;
          goto PCRE_ERROR_RETURN;
          }
        length += 1 + LINK_SIZE;
        if (ptr[1] == '+' || ptr[1] == '*' || ptr[1] == '?' || ptr[1] == '{')
          {
          length += 2 + 2 * LINK_SIZE;
          duplength = 5 + 3 * LINK_SIZE;
          goto HANDLE_QUANTIFIED_BRACKETS;
          }
        continue;
        case 'C':
        ptr += 2;
        while ((digitab[*(++ptr)] & ctype_digit) != 0);
        if (*ptr != ')')
          {
          *errorptr = ERR39;
          goto PCRE_ERROR_RETURN;
          }
        length += 2 + 2*LINK_SIZE;
        continue;
        case 'P':
        ptr += 3;
        if (*ptr == '<')
          {
          const uschar *p;
          p = ++ptr;
          while ((compile_block.ctypes[*ptr] & ctype_word) != 0) ptr++;
          if (*ptr != '>')
            {
            *errorptr = ERR42;
            goto PCRE_ERROR_RETURN;
            }
          name_count++;
          if (ptr - p > max_name_size) max_name_size = (ptr - p);
          break;
          }
        if (*ptr == '=' || *ptr == '>')
          {
          while ((compile_block.ctypes[*(++ptr)] & ctype_word) != 0);
          if (*ptr != ')')
            {
            *errorptr = ERR42;
            goto PCRE_ERROR_RETURN;
            }
          break;
          }
        *errorptr = ERR41;
        goto PCRE_ERROR_RETURN;
        case '<':
        ptr += 3;
        if (*ptr == '=' || *ptr == '!')
          {
          branch_newextra = 1 + LINK_SIZE;
          length += 1 + LINK_SIZE;
          break;
          }
        *errorptr = ERR24;
        goto PCRE_ERROR_RETURN;
        case '(':
        if (ptr[3] == 'R' && ptr[4] == ')')
          {
          ptr += 4;
          length += 3;
          }
        else if ((digitab[ptr[3]] & ctype_digit) != 0)
          {
          ptr += 4;
          length += 3;
          while ((digitab[*ptr] & ctype_digit) != 0) ptr++;
          if (*ptr != ')')
            {
            *errorptr = ERR26;
            goto PCRE_ERROR_RETURN;
            }
          }
        else
          {
          ptr++;
          if (ptr[2] != '?' ||
             (ptr[3] != '=' && ptr[3] != '!' && ptr[3] != '<') )
            {
            ptr += 2;
            *errorptr = ERR28;
            goto PCRE_ERROR_RETURN;
            }
          }
        break;
        default:
        set = unset = 0;
        optset = &set;
        ptr += 2;
        for (;; ptr++)
          {
          c = *ptr;
          switch (c)
            {
            case 'i':
            *optset |= PCRE_CASELESS;
            continue;
            case 'm':
            *optset |= PCRE_MULTILINE;
            continue;
            case 's':
            *optset |= PCRE_DOTALL;
            continue;
            case 'x':
            *optset |= PCRE_EXTENDED;
            continue;
            case 'X':
            *optset |= PCRE_EXTRA;
            continue;
            case 'U':
            *optset |= PCRE_UNGREEDY;
            continue;
            case '-':
            optset = &unset;
            continue;
            case ')':
            if (item_count == 0)
              {
              options = (options | set) & (~unset);
              set = unset = 0;
              item_count--;
              }
            case ':':
            if (((set|unset) & PCRE_IMS) != 0)
              {
              length += 4;
              branch_newextra = 2;
              if (((set|unset) & PCRE_CASELESS) != 0) options |= PCRE_ICHANGED;
              }
            goto END_OPTIONS;
            default:
            *errorptr = ERR12;
            goto PCRE_ERROR_RETURN;
            }
          }
        END_OPTIONS:
        if (c == ')')
          {
          if (branch_newextra == 2 &&
              (branch_extra == 0 || branch_extra == 1+LINK_SIZE))
            branch_extra += branch_newextra;
          continue;
          }
        }
      }
    else if ((options & PCRE_NO_AUTO_CAPTURE) == 0)
      {
      bracount++;
      if (bracount > EXTRACT_BASIC_MAX) bracket_length += 3;
      }
    if (brastackptr >= sizeof(brastack)/sizeof(int))
      {
      *errorptr = ERR19;
      goto PCRE_ERROR_RETURN;
      }
    bralenstack[brastackptr] = branch_extra;
    branch_extra = branch_newextra;
    brastack[brastackptr++] = length;
    length += bracket_length;
    continue;
    case ')':
    length += 1 + LINK_SIZE;
    if (brastackptr > 0)
      {
      duplength = length - brastack[--brastackptr];
      branch_extra = bralenstack[brastackptr];
      }
    else duplength = 0;
    HANDLE_QUANTIFIED_BRACKETS:
    if ((c = ptr[1]) == '{' && is_counted_repeat(ptr+2))
      {
      ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);
      if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
      }
    else if (c == '*') { min = 0; max = -1; ptr++; }
    else if (c == '+') { min = 1; max = -1; ptr++; }
    else if (c == '?') { min = 0; max = 1;  ptr++; }
    else { min = 1; max = 1; }
    if (min == 0)
      {
      length++;
      if (max > 0) length += (max - 1) * (duplength + 3 + 2*LINK_SIZE);
      }
    else
      {
      length += (min - 1) * duplength;
      if (max > min)
        length += (max - min) * (duplength + 3 + 2*LINK_SIZE)
          - (2 + 2*LINK_SIZE);
      }
    if (ptr[1] == '+')
      {
      ptr++;
      length += 2 + 2*LINK_SIZE;
      }
    continue;
    default:
    NORMAL_CHAR:
    if (inescq && c == '\\' && ptr[1] == 'E')
      {
      inescq = FALSE;
      ptr++;
      continue;
      }
    length += 2;
    lastitemlength = 1;
#ifdef SUPPORT_UTF8
    if (utf8 && (c & 0xc0) == 0xc0)
      {
      while ((ptr[1] & 0xc0) == 0x80)
        {
        lastitemlength++;
        length++;
        ptr++;
        }
      }
#endif
    continue;
    }
  }
length += 2 + LINK_SIZE;
if ((options & PCRE_AUTO_CALLOUT) != 0)
  length += 2 + 2*LINK_SIZE;
if (length > MAX_PATTERN_SIZE)
  {
  *errorptr = ERR20;
  return NULL;
  }
size = length + sizeof(real_pcre) + name_count * (max_name_size + 3);
re = (real_pcre *)(pcre_malloc)(size);
if (re == NULL)
  {
  *errorptr = ERR21;
  return NULL;
  }
re->magic_number = MAGIC_NUMBER;
re->size = size;
re->options = options;
re->dummy1 = re->dummy2 = 0;
re->name_table_offset = sizeof(real_pcre);
re->name_entry_size = max_name_size + 3;
re->name_count = name_count;
re->tables = (tables == pcre_default_tables)? NULL : tables;
re->nullpad = NULL;
compile_block.names_found = 0;
compile_block.name_entry_size = max_name_size + 3;
compile_block.name_table = (uschar *)re + re->name_table_offset;
codestart = compile_block.name_table + re->name_entry_size * re->name_count;
compile_block.start_code = codestart;
compile_block.start_pattern = (const uschar *)pattern;
compile_block.req_varyopt = 0;
compile_block.nopartial = FALSE;
ptr = (const uschar *)pattern;
code = (uschar *)codestart;
*code = OP_BRA;
bracount = 0;
(void)compile_regex(options, options & PCRE_IMS, &bracount, &code, &ptr,
  errorptr, FALSE, 0, &firstbyte, &reqbyte, NULL, &compile_block);
re->top_bracket = bracount;
re->top_backref = compile_block.top_backref;
if (compile_block.nopartial) re->options |= PCRE_NOPARTIAL;
if (*errorptr == NULL && *ptr != 0) *errorptr = ERR22;
*code++ = OP_END;
#ifndef DEBUG
if (code - codestart > length) *errorptr = ERR23;
#endif
if (re->top_backref > re->top_bracket) *errorptr = ERR15;
if (*errorptr != NULL)
  {
  (pcre_free)(re);
  PCRE_ERROR_RETURN:
  *erroroffset = ptr - (const uschar *)pattern;
  return NULL;
  }
if ((options & PCRE_ANCHORED) == 0)
  {
  int temp_options = options;
  if (is_anchored(codestart, &temp_options, 0, compile_block.backref_map))
    re->options |= PCRE_ANCHORED;
  else
    {
    if (firstbyte < 0)
      firstbyte = find_firstassertedchar(codestart, &temp_options, FALSE);
    if (firstbyte >= 0)
      {
      int ch = firstbyte & 255;
      re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&
         compile_block.fcc[ch] == ch)? ch : firstbyte;
      re->options |= PCRE_FIRSTSET;
      }
    else if (is_startline(codestart, 0, compile_block.backref_map))
      re->options |= PCRE_STARTLINE;
    }
  }
if (reqbyte >= 0 &&
     ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0))
  {
  int ch = reqbyte & 255;
  re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&
    compile_block.fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;
  re->options |= PCRE_REQCHSET;
  }
#ifdef DEBUG
printf("Length = %d top_bracket = %d top_backref = %d\n",
  length, re->top_bracket, re->top_backref);
if (re->options != 0)
  {
  printf("%s%s%s%s%s%s%s%s%s%s\n",
    ((re->options & PCRE_NOPARTIAL) != 0)? "nopartial " : "",
    ((re->options & PCRE_ANCHORED) != 0)? "anchored " : "",
    ((re->options & PCRE_CASELESS) != 0)? "caseless " : "",
    ((re->options & PCRE_ICHANGED) != 0)? "case state changed " : "",
    ((re->options & PCRE_EXTENDED) != 0)? "extended " : "",
    ((re->options & PCRE_MULTILINE) != 0)? "multiline " : "",
    ((re->options & PCRE_DOTALL) != 0)? "dotall " : "",
    ((re->options & PCRE_DOLLAR_ENDONLY) != 0)? "endonly " : "",
    ((re->options & PCRE_EXTRA) != 0)? "extra " : "",
    ((re->options & PCRE_UNGREEDY) != 0)? "ungreedy " : "");
  }
if ((re->options & PCRE_FIRSTSET) != 0)
  {
  int ch = re->first_byte & 255;
  const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)? "" : " (caseless)";
  if (isprint(ch)) printf("First char = %c%s\n", ch, caseless);
    else printf("First char = \\x%02x%s\n", ch, caseless);
  }
if ((re->options & PCRE_REQCHSET) != 0)
  {
  int ch = re->req_byte & 255;
  const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)? "" : " (caseless)";
  if (isprint(ch)) printf("Req char = %c%s\n", ch, caseless);
    else printf("Req char = \\x%02x%s\n", ch, caseless);
  }
print_internals(re, stdout);
if (code - codestart > length)
  {
  *errorptr = ERR23;
  (pcre_free)(re);
  *erroroffset = ptr - (uschar *)pattern;
  return NULL;
  }
#endif
return (pcre *)re;
}
['pcre *\npcre_compile(const char *pattern, int options, const char **errorptr,\n  int *erroroffset, const unsigned char *tables)\n{\nreal_pcre *re;\nint length = 1 + LINK_SIZE;\nint c, firstbyte, reqbyte;\nint bracount = 0;\nint branch_extra = 0;\nint branch_newextra;\nint item_count = -1;\nint name_count = 0;\nint max_name_size = 0;\nint lastitemlength = 0;\n#ifdef SUPPORT_UTF8\nBOOL utf8;\nBOOL class_utf8;\n#endif\nBOOL inescq = FALSE;\nunsigned int brastackptr = 0;\nsize_t size;\nuschar *code;\nconst uschar *codestart;\nconst uschar *ptr;\ncompile_data compile_block;\nint brastack[BRASTACK_SIZE];\nuschar bralenstack[BRASTACK_SIZE];\nif (errorptr == NULL) return NULL;\n*errorptr = NULL;\nif (erroroffset == NULL)\n  {\n  *errorptr = ERR16;\n  return NULL;\n  }\n*erroroffset = 0;\n#ifdef SUPPORT_UTF8\nutf8 = (options & PCRE_UTF8) != 0;\nif (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 &&\n     (*erroroffset = valid_utf8((uschar *)pattern, -1)) >= 0)\n  {\n  *errorptr = ERR44;\n  return NULL;\n  }\n#else\nif ((options & PCRE_UTF8) != 0)\n  {\n  *errorptr = ERR32;\n  return NULL;\n  }\n#endif\nif ((options & ~PUBLIC_OPTIONS) != 0)\n  {\n  *errorptr = ERR17;\n  return NULL;\n  }\nif (tables == NULL) tables = pcre_default_tables;\ncompile_block.lcc = tables + lcc_offset;\ncompile_block.fcc = tables + fcc_offset;\ncompile_block.cbits = tables + cbits_offset;\ncompile_block.ctypes = tables + ctypes_offset;\ncompile_block.top_backref = 0;\ncompile_block.backref_map = 0;\nDPRINTF(("------------------------------------------------------------------\\n"));\nDPRINTF(("%s\\n", pattern));\nptr = (const uschar *)(pattern - 1);\nwhile ((c = *(++ptr)) != 0)\n  {\n  int min, max;\n  int class_optcount;\n  int bracket_length;\n  int duplength;\n  if (inescq)\n    {\n    if ((options & PCRE_AUTO_CALLOUT) != 0) length += 2 + 2*LINK_SIZE;\n    goto NORMAL_CHAR;\n    }\n  if ((options & PCRE_EXTENDED) != 0)\n    {\n    if ((compile_block.ctypes[c] & ctype_space) != 0) continue;\n    if (c == \'#\')\n      {\n      while ((c = *(++ptr)) != 0 && c != NEWLINE) ;\n      if (c == 0) break;\n      continue;\n      }\n    }\n  item_count++;\n  if ((options & PCRE_AUTO_CALLOUT) != 0 &&\n       c != \'*\' && c != \'+\' && c != \'?\' &&\n       (c != \'{\' || !is_counted_repeat(ptr + 1)))\n    length += 2 + 2*LINK_SIZE;\n  switch(c)\n    {\n    case \'\\\\\':\n    c = check_escape(&ptr, errorptr, bracount, options, FALSE);\n    if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n    lastitemlength = 1;\n    if (c >= 0)\n      {\n      length += 2;\n#ifdef SUPPORT_UTF8\n      if (utf8 && c > 127)\n        {\n        int i;\n        for (i = 0; i < sizeof(utf8_table1)/sizeof(int); i++)\n          if (c <= utf8_table1[i]) break;\n        length += i;\n        lastitemlength += i;\n        }\n#endif\n      continue;\n      }\n    if (-c == ESC_Q)\n      {\n      inescq = TRUE;\n      continue;\n      }\n#ifndef SUPPORT_UCP\n    if (-c == ESC_X)\n      {\n      *errorptr = ERR45;\n      goto PCRE_ERROR_RETURN;\n      }\n#endif\n    else if (-c == ESC_P || -c == ESC_p)\n      {\n#ifdef SUPPORT_UCP\n      BOOL negated;\n      length += 2;\n      lastitemlength = 2;\n      if (get_ucp(&ptr, &negated, errorptr) < 0) goto PCRE_ERROR_RETURN;\n      continue;\n#else\n      *errorptr = ERR45;\n      goto PCRE_ERROR_RETURN;\n#endif\n      }\n    length++;\n    if (c <= -ESC_REF)\n      {\n      int refnum = -c - ESC_REF;\n      compile_block.backref_map |= (refnum < 32)? (1 << refnum) : 1;\n      if (refnum > compile_block.top_backref)\n        compile_block.top_backref = refnum;\n      length += 2;\n      if (ptr[1] == \'{\' && is_counted_repeat(ptr+2))\n        {\n        ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if ((min == 0 && (max == 1 || max == -1)) ||\n          (min == 1 && max == -1))\n            length++;\n        else length += 5;\n        if (ptr[1] == \'?\') ptr++;\n        }\n      }\n    continue;\n    case \'^\':\n    case \'.\':\n    case \'$\':\n    length++;\n    lastitemlength = 1;\n    continue;\n    case \'*\':\n    case \'+\':\n    case \'?\':\n    length++;\n    goto POSESSIVE;\n    case \'{\':\n    if (!is_counted_repeat(ptr+1)) goto NORMAL_CHAR;\n    ptr = read_repeat_counts(ptr+1, &min, &max, errorptr);\n    if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n    if ((min == 0 && (max == 1 || max == -1)) ||\n      (min == 1 && max == -1))\n        length++;\n    else\n      {\n      if (min != 1)\n        {\n        length -= lastitemlength;\n        if (min > 0) length += 3 + lastitemlength;\n        }\n      length += lastitemlength + ((max > 0)? 3 : 1);\n      }\n    if (ptr[1] == \'?\') ptr++;\n    POSESSIVE:\n    if (ptr[1] == \'+\')\n      {\n      ptr++;\n      length += 2 + 2*LINK_SIZE;\n      }\n    continue;\n    case \'|\':\n    length += 1 + LINK_SIZE + branch_extra;\n    continue;\n    case \'[\':\n    if (*(++ptr) == \'^\')\n      {\n      class_optcount = 10;\n      ptr++;\n      }\n    else class_optcount = 0;\n#ifdef SUPPORT_UTF8\n    class_utf8 = FALSE;\n#endif\n    if (*ptr != 0) do\n      {\n      if (inescq)\n        {\n        if (*ptr != \'\\\\\' || ptr[1] != \'E\') goto GET_ONE_CHARACTER;\n        inescq = FALSE;\n        ptr += 1;\n        continue;\n        }\n      if (*ptr == \'\\\\\')\n        {\n        c = check_escape(&ptr, errorptr, bracount, options, TRUE);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if (-c == ESC_b) c = \'\\b\';\n        else if (-c == ESC_X) c = \'X\';\n        else if (-c == ESC_Q)\n          {\n          inescq = TRUE;\n          continue;\n          }\n        if (c >= 0) goto NON_SPECIAL_CHARACTER;\n        else\n          {\n          class_optcount = 10;\n#ifdef SUPPORT_UTF8\n          if (-c == ESC_p || -c == ESC_P)\n            {\n            if (!class_utf8)\n              {\n              class_utf8 = TRUE;\n              length += LINK_SIZE + 2;\n              }\n            length += 2;\n            }\n#endif\n          }\n        }\n      else if (*ptr == \'[\' && check_posix_syntax(ptr, &ptr, &compile_block))\n        {\n        ptr++;\n        class_optcount = 10;\n        }\n      else\n        {\n        int d;\n        GET_ONE_CHARACTER:\n#ifdef SUPPORT_UTF8\n        if (utf8)\n          {\n          int extra = 0;\n          GETCHARLEN(c, ptr, extra);\n          ptr += extra;\n          }\n        else c = *ptr;\n#else\n        c = *ptr;\n#endif\n        NON_SPECIAL_CHARACTER:\n        class_optcount++;\n        d = -1;\n        if (ptr[1] == \'-\')\n          {\n          uschar const *hyptr = ptr++;\n          if (ptr[1] == \'\\\\\')\n            {\n            ptr++;\n            d = check_escape(&ptr, errorptr, bracount, options, TRUE);\n            if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n            if (-d == ESC_b) d = \'\\b\';\n            else if (-d == ESC_X) d = \'X\';\n            }\n          else if (ptr[1] != 0 && ptr[1] != \']\')\n            {\n            ptr++;\n#ifdef SUPPORT_UTF8\n            if (utf8)\n              {\n              int extra = 0;\n              GETCHARLEN(d, ptr, extra);\n              ptr += extra;\n              }\n            else\n#endif\n            d = *ptr;\n            }\n          if (d < 0) ptr = hyptr;\n          }\n        if (d >= 0)\n          {\n          class_optcount = 10;\n          if (d < c)\n            {\n            *errorptr = ERR8;\n            goto PCRE_ERROR_RETURN;\n            }\n#ifdef SUPPORT_UTF8\n          if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))\n            {\n            uschar buffer[6];\n            if (!class_utf8)\n              {\n              class_utf8 = TRUE;\n              length += LINK_SIZE + 2;\n              }\n#ifdef SUPPORT_UCP\n            if ((options & PCRE_CASELESS) != 0)\n              {\n              int occ, ocd;\n              int cc = c;\n              int origd = d;\n              while (get_othercase_range(&cc, origd, &occ, &ocd))\n                {\n                if (occ >= c && ocd <= d) continue;\n                if (occ < c  && ocd >= c - 1)\n                  {\n                  c = occ;\n                  continue;\n                  }\n                if (ocd > d && occ <= d + 1)\n                  {\n                  d = ocd;\n                  continue;\n                  }\n                length += 1 + ord2utf8(occ, buffer) +\n                  ((occ == ocd)? 0 : ord2utf8(ocd, buffer));\n                }\n              }\n#endif\n            length += 1 + ord2utf8(c, buffer) + ord2utf8(d, buffer);\n            }\n#endif\n          }\n        else\n          {\n#ifdef SUPPORT_UTF8\n          if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))\n            {\n            uschar buffer[6];\n            class_optcount = 10;\n            if (!class_utf8)\n              {\n              class_utf8 = TRUE;\n              length += LINK_SIZE + 2;\n              }\n#ifdef SUPPORT_UCP\n            length += (((options & PCRE_CASELESS) != 0)? 2 : 1) *\n              (1 + ord2utf8(c, buffer));\n#else\n            length += 1 + ord2utf8(c, buffer);\n#endif\n            }\n#endif\n          }\n        }\n      }\n    while (*(++ptr) != 0 && (inescq || *ptr != \']\'));\n    if (*ptr == 0)\n      {\n      *errorptr = ERR6;\n      goto PCRE_ERROR_RETURN;\n      }\n    if (class_optcount == 1) length += 3; else\n      {\n      length += 33;\n      if (*ptr != 0 && ptr[1] == \'{\' && is_counted_repeat(ptr+2))\n        {\n        ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);\n        if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n        if ((min == 0 && (max == 1 || max == -1)) ||\n          (min == 1 && max == -1))\n            length++;\n        else length += 5;\n        if (ptr[1] == \'+\')\n          {\n          ptr++;\n          length += 2 + 2*LINK_SIZE;\n          }\n        else if (ptr[1] == \'?\') ptr++;\n        }\n      }\n    continue;\n    case \'(\':\n    branch_newextra = 0;\n    bracket_length = 1 + LINK_SIZE;\n    if (ptr[1] == \'?\')\n      {\n      int set, unset;\n      int *optset;\n      switch (c = ptr[2])\n        {\n        case \'#\':\n        ptr += 3;\n        while (*ptr != 0 && *ptr != \')\') ptr++;\n        if (*ptr == 0)\n          {\n          *errorptr = ERR18;\n          goto PCRE_ERROR_RETURN;\n          }\n        continue;\n        case \':\':\n        case \'=\':\n        case \'!\':\n        case \'>\':\n        ptr += 2;\n        break;\n        case \'R\':\n        ptr++;\n        case \'0\': case \'1\': case \'2\': case \'3\': case \'4\':\n        case \'5\': case \'6\': case \'7\': case \'8\': case \'9\':\n        ptr += 2;\n        if (c != \'R\')\n          while ((digitab[*(++ptr)] & ctype_digit) != 0);\n        if (*ptr != \')\')\n          {\n          *errorptr = ERR29;\n          goto PCRE_ERROR_RETURN;\n          }\n        length += 1 + LINK_SIZE;\n        if (ptr[1] == \'+\' || ptr[1] == \'*\' || ptr[1] == \'?\' || ptr[1] == \'{\')\n          {\n          length += 2 + 2 * LINK_SIZE;\n          duplength = 5 + 3 * LINK_SIZE;\n          goto HANDLE_QUANTIFIED_BRACKETS;\n          }\n        continue;\n        case \'C\':\n        ptr += 2;\n        while ((digitab[*(++ptr)] & ctype_digit) != 0);\n        if (*ptr != \')\')\n          {\n          *errorptr = ERR39;\n          goto PCRE_ERROR_RETURN;\n          }\n        length += 2 + 2*LINK_SIZE;\n        continue;\n        case \'P\':\n        ptr += 3;\n        if (*ptr == \'<\')\n          {\n          const uschar *p;\n          p = ++ptr;\n          while ((compile_block.ctypes[*ptr] & ctype_word) != 0) ptr++;\n          if (*ptr != \'>\')\n            {\n            *errorptr = ERR42;\n            goto PCRE_ERROR_RETURN;\n            }\n          name_count++;\n          if (ptr - p > max_name_size) max_name_size = (ptr - p);\n          break;\n          }\n        if (*ptr == \'=\' || *ptr == \'>\')\n          {\n          while ((compile_block.ctypes[*(++ptr)] & ctype_word) != 0);\n          if (*ptr != \')\')\n            {\n            *errorptr = ERR42;\n            goto PCRE_ERROR_RETURN;\n            }\n          break;\n          }\n        *errorptr = ERR41;\n        goto PCRE_ERROR_RETURN;\n        case \'<\':\n        ptr += 3;\n        if (*ptr == \'=\' || *ptr == \'!\')\n          {\n          branch_newextra = 1 + LINK_SIZE;\n          length += 1 + LINK_SIZE;\n          break;\n          }\n        *errorptr = ERR24;\n        goto PCRE_ERROR_RETURN;\n        case \'(\':\n        if (ptr[3] == \'R\' && ptr[4] == \')\')\n          {\n          ptr += 4;\n          length += 3;\n          }\n        else if ((digitab[ptr[3]] & ctype_digit) != 0)\n          {\n          ptr += 4;\n          length += 3;\n          while ((digitab[*ptr] & ctype_digit) != 0) ptr++;\n          if (*ptr != \')\')\n            {\n            *errorptr = ERR26;\n            goto PCRE_ERROR_RETURN;\n            }\n          }\n        else\n          {\n          ptr++;\n          if (ptr[2] != \'?\' ||\n             (ptr[3] != \'=\' && ptr[3] != \'!\' && ptr[3] != \'<\') )\n            {\n            ptr += 2;\n            *errorptr = ERR28;\n            goto PCRE_ERROR_RETURN;\n            }\n          }\n        break;\n        default:\n        set = unset = 0;\n        optset = &set;\n        ptr += 2;\n        for (;; ptr++)\n          {\n          c = *ptr;\n          switch (c)\n            {\n            case \'i\':\n            *optset |= PCRE_CASELESS;\n            continue;\n            case \'m\':\n            *optset |= PCRE_MULTILINE;\n            continue;\n            case \'s\':\n            *optset |= PCRE_DOTALL;\n            continue;\n            case \'x\':\n            *optset |= PCRE_EXTENDED;\n            continue;\n            case \'X\':\n            *optset |= PCRE_EXTRA;\n            continue;\n            case \'U\':\n            *optset |= PCRE_UNGREEDY;\n            continue;\n            case \'-\':\n            optset = &unset;\n            continue;\n            case \')\':\n            if (item_count == 0)\n              {\n              options = (options | set) & (~unset);\n              set = unset = 0;\n              item_count--;\n              }\n            case \':\':\n            if (((set|unset) & PCRE_IMS) != 0)\n              {\n              length += 4;\n              branch_newextra = 2;\n              if (((set|unset) & PCRE_CASELESS) != 0) options |= PCRE_ICHANGED;\n              }\n            goto END_OPTIONS;\n            default:\n            *errorptr = ERR12;\n            goto PCRE_ERROR_RETURN;\n            }\n          }\n        END_OPTIONS:\n        if (c == \')\')\n          {\n          if (branch_newextra == 2 &&\n              (branch_extra == 0 || branch_extra == 1+LINK_SIZE))\n            branch_extra += branch_newextra;\n          continue;\n          }\n        }\n      }\n    else if ((options & PCRE_NO_AUTO_CAPTURE) == 0)\n      {\n      bracount++;\n      if (bracount > EXTRACT_BASIC_MAX) bracket_length += 3;\n      }\n    if (brastackptr >= sizeof(brastack)/sizeof(int))\n      {\n      *errorptr = ERR19;\n      goto PCRE_ERROR_RETURN;\n      }\n    bralenstack[brastackptr] = branch_extra;\n    branch_extra = branch_newextra;\n    brastack[brastackptr++] = length;\n    length += bracket_length;\n    continue;\n    case \')\':\n    length += 1 + LINK_SIZE;\n    if (brastackptr > 0)\n      {\n      duplength = length - brastack[--brastackptr];\n      branch_extra = bralenstack[brastackptr];\n      }\n    else duplength = 0;\n    HANDLE_QUANTIFIED_BRACKETS:\n    if ((c = ptr[1]) == \'{\' && is_counted_repeat(ptr+2))\n      {\n      ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);\n      if (*errorptr != NULL) goto PCRE_ERROR_RETURN;\n      }\n    else if (c == \'*\') { min = 0; max = -1; ptr++; }\n    else if (c == \'+\') { min = 1; max = -1; ptr++; }\n    else if (c == \'?\') { min = 0; max = 1;  ptr++; }\n    else { min = 1; max = 1; }\n    if (min == 0)\n      {\n      length++;\n      if (max > 0) length += (max - 1) * (duplength + 3 + 2*LINK_SIZE);\n      }\n    else\n      {\n      length += (min - 1) * duplength;\n      if (max > min)\n        length += (max - min) * (duplength + 3 + 2*LINK_SIZE)\n          - (2 + 2*LINK_SIZE);\n      }\n    if (ptr[1] == \'+\')\n      {\n      ptr++;\n      length += 2 + 2*LINK_SIZE;\n      }\n    continue;\n    default:\n    NORMAL_CHAR:\n    if (inescq && c == \'\\\\\' && ptr[1] == \'E\')\n      {\n      inescq = FALSE;\n      ptr++;\n      continue;\n      }\n    length += 2;\n    lastitemlength = 1;\n#ifdef SUPPORT_UTF8\n    if (utf8 && (c & 0xc0) == 0xc0)\n      {\n      while ((ptr[1] & 0xc0) == 0x80)\n        {\n        lastitemlength++;\n        length++;\n        ptr++;\n        }\n      }\n#endif\n    continue;\n    }\n  }\nlength += 2 + LINK_SIZE;\nif ((options & PCRE_AUTO_CALLOUT) != 0)\n  length += 2 + 2*LINK_SIZE;\nif (length > MAX_PATTERN_SIZE)\n  {\n  *errorptr = ERR20;\n  return NULL;\n  }\nsize = length + sizeof(real_pcre) + name_count * (max_name_size + 3);\nre = (real_pcre *)(pcre_malloc)(size);\nif (re == NULL)\n  {\n  *errorptr = ERR21;\n  return NULL;\n  }\nre->magic_number = MAGIC_NUMBER;\nre->size = size;\nre->options = options;\nre->dummy1 = re->dummy2 = 0;\nre->name_table_offset = sizeof(real_pcre);\nre->name_entry_size = max_name_size + 3;\nre->name_count = name_count;\nre->tables = (tables == pcre_default_tables)? NULL : tables;\nre->nullpad = NULL;\ncompile_block.names_found = 0;\ncompile_block.name_entry_size = max_name_size + 3;\ncompile_block.name_table = (uschar *)re + re->name_table_offset;\ncodestart = compile_block.name_table + re->name_entry_size * re->name_count;\ncompile_block.start_code = codestart;\ncompile_block.start_pattern = (const uschar *)pattern;\ncompile_block.req_varyopt = 0;\ncompile_block.nopartial = FALSE;\nptr = (const uschar *)pattern;\ncode = (uschar *)codestart;\n*code = OP_BRA;\nbracount = 0;\n(void)compile_regex(options, options & PCRE_IMS, &bracount, &code, &ptr,\n  errorptr, FALSE, 0, &firstbyte, &reqbyte, NULL, &compile_block);\nre->top_bracket = bracount;\nre->top_backref = compile_block.top_backref;\nif (compile_block.nopartial) re->options |= PCRE_NOPARTIAL;\nif (*errorptr == NULL && *ptr != 0) *errorptr = ERR22;\n*code++ = OP_END;\n#ifndef DEBUG\nif (code - codestart > length) *errorptr = ERR23;\n#endif\nif (re->top_backref > re->top_bracket) *errorptr = ERR15;\nif (*errorptr != NULL)\n  {\n  (pcre_free)(re);\n  PCRE_ERROR_RETURN:\n  *erroroffset = ptr - (const uschar *)pattern;\n  return NULL;\n  }\nif ((options & PCRE_ANCHORED) == 0)\n  {\n  int temp_options = options;\n  if (is_anchored(codestart, &temp_options, 0, compile_block.backref_map))\n    re->options |= PCRE_ANCHORED;\n  else\n    {\n    if (firstbyte < 0)\n      firstbyte = find_firstassertedchar(codestart, &temp_options, FALSE);\n    if (firstbyte >= 0)\n      {\n      int ch = firstbyte & 255;\n      re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&\n         compile_block.fcc[ch] == ch)? ch : firstbyte;\n      re->options |= PCRE_FIRSTSET;\n      }\n    else if (is_startline(codestart, 0, compile_block.backref_map))\n      re->options |= PCRE_STARTLINE;\n    }\n  }\nif (reqbyte >= 0 &&\n     ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0))\n  {\n  int ch = reqbyte & 255;\n  re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&\n    compile_block.fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;\n  re->options |= PCRE_REQCHSET;\n  }\n#ifdef DEBUG\nprintf("Length = %d top_bracket = %d top_backref = %d\\n",\n  length, re->top_bracket, re->top_backref);\nif (re->options != 0)\n  {\n  printf("%s%s%s%s%s%s%s%s%s%s\\n",\n    ((re->options & PCRE_NOPARTIAL) != 0)? "nopartial " : "",\n    ((re->options & PCRE_ANCHORED) != 0)? "anchored " : "",\n    ((re->options & PCRE_CASELESS) != 0)? "caseless " : "",\n    ((re->options & PCRE_ICHANGED) != 0)? "case state changed " : "",\n    ((re->options & PCRE_EXTENDED) != 0)? "extended " : "",\n    ((re->options & PCRE_MULTILINE) != 0)? "multiline " : "",\n    ((re->options & PCRE_DOTALL) != 0)? "dotall " : "",\n    ((re->options & PCRE_DOLLAR_ENDONLY) != 0)? "endonly " : "",\n    ((re->options & PCRE_EXTRA) != 0)? "extra " : "",\n    ((re->options & PCRE_UNGREEDY) != 0)? "ungreedy " : "");\n  }\nif ((re->options & PCRE_FIRSTSET) != 0)\n  {\n  int ch = re->first_byte & 255;\n  const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)? "" : " (caseless)";\n  if (isprint(ch)) printf("First char = %c%s\\n", ch, caseless);\n    else printf("First char = \\\\x%02x%s\\n", ch, caseless);\n  }\nif ((re->options & PCRE_REQCHSET) != 0)\n  {\n  int ch = re->req_byte & 255;\n  const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)? "" : " (caseless)";\n  if (isprint(ch)) printf("Req char = %c%s\\n", ch, caseless);\n    else printf("Req char = \\\\x%02x%s\\n", ch, caseless);\n  }\nprint_internals(re, stdout);\nif (code - codestart > length)\n  {\n  *errorptr = ERR23;\n  (pcre_free)(re);\n  *erroroffset = ptr - (uschar *)pattern;\n  return NULL;\n  }\n#endif\nreturn (pcre *)re;\n}']