Re: [pcre-dev] [Bug 733] pcre_fullinfo() returns wrong PCRE_…

Top Page
Delete this message
Author: Issaana
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] [Bug 733] pcre_fullinfo() returns wrong PCRE_INFO_NAMECOUNT on some patterns
On 2008-07-14 18:41, Philip Hazel wrote:
> Are there any Windows users on the pcre-dev list (to which this message
> goes) who are able to help debug this?


I could reproduce this problem with the following environment.

OS : Ubuntu 8.04
Compiler : gcc 4.2.3
PCRE version : 7.7 (2008-05-07)


* using pcretest

  re>/(?x)1|2 #(?<N>3)/I
Capturing subpattern count = 0
Named capturing subpatterns:
      0
Options: extended
No first char
No need char



* using the following small C code. (The output result is "ret=0, namecount=1")

  re = pcre_compile("(?x)1|2 #(?<N>3)", 0, &errorptr, &erroroffset, NULL);
  if (re != NULL) {
    ret = pcre_fullinfo(re, NULL, PCRE_INFO_NAMECOUNT, &namecount);
    printf("ret=%d, namecount=%d\n", ret, namecount);
  } else {
    printf("%s\n", errorptr);
  }



So I think that this problem does not depend on the environment.
Is the following related to this problem?

    [Pcre-svn] [360] code/trunk: Fix CVE-2008-2371 ( outer level option with 
alternatives caused crash).



Thanks,
Issaana