#50618 [Opn]: php crashed when preg_replace on some case.

2009-12-30 Thread sarun37823 at bigfoot dot com
 ID:   50618
 User updated by:  sarun37823 at bigfoot dot com
 Reported By:  sarun37823 at bigfoot dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  5.2.12
 New Comment:

I just test code above with php 5.2.5 on WinXP
It's work fine.


Previous Comments:


[2009-12-31 07:43:42] sarun37823 at bigfoot dot com

Add:
I think it's about * in (?:.(?!made an edit|<\/?li))*
Main Idea of this regular expression is to replace
 to  with no li tag inside and with "made an
edit" string



[2009-12-31 07:17:57] sarun37823 at bigfoot dot com

if there's no  in test file
or i just replace  with 
It can work properly.



[2009-12-31 06:11:21] sarun37823 at bigfoot dot com

Description:

I use preg_replace It work fine for most subject(data)
except one.

Reproduce code:
---
http://www.greatduo.da.ru/files/phpbug1.data
$page_c=preg_replace('/]*>(?:.(?!made an
edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c);
?>

Expected result:

blank page

Actual result:
--
Error: Zero Sized Reply





-- 
Edit this bug report at http://bugs.php.net/?id=50618&edit=1



#50618 [Opn]: php crashed when preg_replace on some case.

2009-12-30 Thread sarun37823 at bigfoot dot com
 ID:   50618
 User updated by:  sarun37823 at bigfoot dot com
 Reported By:  sarun37823 at bigfoot dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  5.2.12
 New Comment:

Add:
I think it's about * in (?:.(?!made an edit|<\/?li))*
Main Idea of this regular expression is to replace
 to  with no li tag inside and with "made an
edit" string


Previous Comments:


[2009-12-31 07:17:57] sarun37823 at bigfoot dot com

if there's no  in test file
or i just replace  with 
It can work properly.



[2009-12-31 06:11:21] sarun37823 at bigfoot dot com

Description:

I use preg_replace It work fine for most subject(data)
except one.

Reproduce code:
---
http://www.greatduo.da.ru/files/phpbug1.data
$page_c=preg_replace('/]*>(?:.(?!made an
edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c);
?>

Expected result:

blank page

Actual result:
--
Error: Zero Sized Reply





-- 
Edit this bug report at http://bugs.php.net/?id=50618&edit=1



#50618 [Opn]: php crashed when preg_replace on some case.

2009-12-30 Thread sarun37823 at bigfoot dot com
 ID:   50618
 User updated by:  sarun37823 at bigfoot dot com
 Reported By:  sarun37823 at bigfoot dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: Linux
 PHP Version:  5.2.12
 New Comment:

if there's no  in test file
or i just replace  with 
It can work properly.


Previous Comments:


[2009-12-31 06:11:21] sarun37823 at bigfoot dot com

Description:

I use preg_replace It work fine for most subject(data)
except one.

Reproduce code:
---
http://www.greatduo.da.ru/files/phpbug1.data
$page_c=preg_replace('/]*>(?:.(?!made an
edit|<\/?li))*.made[^<>]*<\/div><\/li>/sim', '', $page_c);
?>

Expected result:

blank page

Actual result:
--
Error: Zero Sized Reply





-- 
Edit this bug report at http://bugs.php.net/?id=50618&edit=1