From:             johnpupu at gmail dot com
Operating system: FreeBSD 7.0-RELEASE-p4
PHP version:      5.2.6
PHP Bug Type:     Regexps related
Bug description:  preg_replace crash the httpd process

Description:
------------
if i use preg_replace function , my system log will show
Nov 12 13:41:31 mail kernel: pid 51185 (httpd), uid 80: exited on signal
4

i try to use ereg_replace, mb_ereg_replace function , it works . 

so I think it's preg_replace bugs.


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

sql statement is 
INSERT IGNORE INTO bb_posts_text (post_id, post_text) VALUES ( '117766',
'[EMAIL PROTECTED]
¦ý¤§«á´N·í§L¤F ¨S¤°»ò®É¶¡ À³¸Ó»¡¤]¨S¾÷·|ª±¨ì·Ó¹³¤â¾÷
¨º®É´N¥u¦n¦b­x¤¤®³nokia ªºE60´¼¼z¤â¾÷¹L¹L°®Å}
²×©óªü ³Q§Ú¼õ¨ì°h¥î¤F...©Ò¥H©O·íµM´N¸ò
[EMAIL PROTECTED]
³oª±ªº´X¤Ñ´Á¶¡°£¤F¥Î¬Û¾÷©ç·Ó¥~...¦]¬°¤â¾÷¥Ø«e®³ªº¬Oiphone
©Ò¥H¤]ÀH¤â®³¥X¨Ó¶Ã©ç....ÁöµM¤j®a³£ª¾¹Diphone±j¶µ¤£¦b¬Û¾÷
¬Æ¦Ü´¶¹M¦³¤H·|ı±o¥¦ªº©ç·Ó«ÜÄê...¦ý¸g¹L³o¦¸iphone¬Û¾÷³­§Ú¾Þ¤F4¤Ñ¤§«á
¦ý§Ú¯uªºÄ±±o°Õ ¥H¥Lªº200¸Uµ¥¯Å µL¦Û°Ê¹ïµJµ¥¯Å¨Ó»¡
³o¤ä©ç·Ó§Úı±o¥i¥H¦b³o¨Çµ¥¯Åªº¤â¾÷¸ÌºâÆZ«e­±ªº¤F
(ºâ¬O­È±o¹Å³\©Ô..¦Ü¤Ö¥H¥L©ç·Ó³W®æ¨Ó¬Ý..¦]¬°¥ý«e¥Î¹LµLaf200¸Uµe¯À©ç' )


-- 
Edit bug report at http://bugs.php.net/?id=46551&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46551&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46551&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46551&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46551&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46551&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46551&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46551&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46551&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46551&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46551&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46551&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46551&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46551&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46551&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46551&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46551&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46551&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46551&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46551&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46551&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46551&r=mysqlcfg

Reply via email to