[pcre-dev] [Bug 1037] New: Incorrect using of GETCHARLENGTH(…

Pàgina inicial
Delete this message
Autor: Dmitry Ukolov
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 1037] New: Incorrect using of GETCHARLENGTH(...) in pcre_compile.c
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1037
           Summary: Incorrect using of GETCHARLENGTH(...) in pcre_compile.c
           Product: PCRE
           Version: 8.10
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: bug
          Priority: low
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: udmitry@???
                CC: pcre-dev@???



Hi, there is wrong expression in pcre_compile.c

line 3340:
      if (utf8 && c > 127)
        {                           /* Braces are required because the */
        GETCHARLENGTH(c, ptr, ptr);    /* macro generates multiple statements
*/
        }



and

line 3751:
        if (utf8)
          {                           /* Braces are required because the */
          GETCHARLENGTH(d, ptr, ptr);    /* macro generates multiple statements
*/
          }



It must be changed to GETCHAR(c, ptr) and GETCHAR(d, ptr);

I try modify GETCHARLENGTH macro, and got wrong results, until make this change
in pcre_compile.c

Thanks,
Dmitry.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email