[pcre-dev] [Bug 650] New: SIGSEGV with UTF-8 data

Página superior
Eliminar este mensaje
Autor: Craig Haft
Fecha:  
A: pcre-dev
Asunto: [pcre-dev] [Bug 650] New: SIGSEGV with UTF-8 data
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=650
           Summary: SIGSEGV with UTF-8 data
           Product: PCRE
           Version: 7.0
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: craig.haft@???
                CC: pcre-dev@???



We had our servers crash at line 3468 of pcre_exec.c. Is was able to reproduce
the problem with the compiled pattern ".*a.*=.b.*" and the utf-8 data "\x61
\xe2 \x80 \xa9 \x62". I tried using version 7.4 and the SIGSEGV still occured.

It seems as though the first call to match returns MATCH_NOMATCH, and pcre_exec
tries again with a start_pointer in the middle of a UTF-8 encoded character.
Inside the for (;;) loop in match, BACKCHAR steps to the start of the utf-8
encoded character and the if (eptr-- == pp) break; statement never matches


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