[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#85799: More info



Note that this appears to happen regardless of what flags are used with
regcomp, and has something to do with the relationship between the pattern and
the string passed to regexec.  When using the pattern "nls", passing the string
"exten" to regexec exhibits the problem, while "exte" does not.

When using an empty pattern (""), passing "x" to regcomp exhibits the problem,
while using the empty string does not.  Attached is a reduced test case
that demonstrates this.

-- 
 - mdz
#include <sys/types.h>
#include <regex.h>

int main(void) {
  regex_t re;
  if (regcomp(&re, "", 0) != 0) {
    return 1;
  }

  for(;;)
    regexec(&re, "", 0, 0, 0);
}

Reply to: