[pcre-dev] [Bug 1233] New: Segfault at replacement in long s…

Startseite
Nachricht löschen
Autor: Robin
Datum:  
To: pcre-dev
Betreff: [pcre-dev] [Bug 1233] New: Segfault at replacement in long string
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1233
           Summary: Segfault at replacement in long string
           Product: PCRE
           Version: 7.6
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: robin@???
                CC: pcre-dev@???



Hi , this bug comesn PHP and segfaults in pcrelib (so PHP dev's pointed me
here)

When i do a preg_replace when removing everything between single quotes in a
string, with a 3397+ bytes string between single quotes:

string = "select * from ape where food = '...3397 chars or more...'"

the process failes with segmentation fault:

[25237682.428057] php[4960]: segfault at bf085fa4 ip b73eed6c sp bf085f60 error
6 in libpcre.so.3.12.1[b73de000+28000]

The (php) function used:

$cleanstr = preg_replace("/'(\\\\'|\\\\{2}|[^'])*'/", '', $str);


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