|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46551 preg_replace crash the httpd process
Submitted: 2008-11-12 06:11 UTC Modified: 2008-11-20 01:00 UTC
Avg. Score:4.1 ± 1.4
Reproduced:12 of 12 (100.0%)
Same Version:7 (58.3%)
Same OS:2 (16.7%)
From: johnpupu at gmail dot com Assigned:
Status: No Feedback Package: PCRE related
PHP Version: 5.2.6 OS: FreeBSD 7.0-RELEASE-p4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-11-12 06:11 UTC] johnpupu at gmail dot com
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', '?I!!?Q???@?~?e???L?e?]?ܱ`?W??mml???j?a???y???ɷӤ?
???????N???L?F ?S?????ɶ? ???ӻ??]?S???|?????ӹ?????
???ɴN?u?n?b?x????nokia ??E60???z?????L?L???}
?ש??? ?Q?ڼ????h???F...?ҥH?O???M?N?? ?n?X???h??̥S?@?_?X?h???F???ӴX??
???گ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????' )


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-12 13:09 UTC]
Please try using this CVS snapshot:
For Windows:

And also, you need to provide the full configure line you used to compile PHP. If you're using anything but bundled PCRE lib -> bogus.
 [2008-11-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 01:01:29 2024 UTC