[pcre-dev] [Bug 1233] Segfault at replacement in long string

Top Page
Delete this message
Author: Bart McLeod
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 1233] 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

Bart McLeod <mcleod@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcleod@???





--- Comment #2 from Bart McLeod <mcleod@???> 2012-05-10 00:18:38 ---
I have an example that involves no replacement, just mathing and also uses a
more recent version of the PCRE lib.

<?php

       $value = str_repeat('aaaa\\\'aaaaa', 100);
       $query = "INSERT INTO `pcre` (`test`) VALUES ('$value')";
       $matches = array();
       $q = "'";
       $qe = preg_quote("\'");
       preg_match_all("/'($qe|[^'])*'/s", $query, $matches);
       var_dump($matches);
?>


If you increase the value of the repition from 100 to 1000 it will segfault. No
replacement is involved.

In the documentation I find: define ('PCRE_VERSION', "8.12 2011-01-15"); So I
assume I use version 8.12, which is not that old.


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