wordwrap crashes with 4 parameters and width=0
| Bug #12768 | wordwrap crashes with 4 parameters and width=0 | ||||
|---|---|---|---|---|---|
| Submitted: | 2001-08-15 12:00 UTC | Modified: | 2002-01-04 14:49 UTC | ||
| From: | marc dot pohl at wwf-gruppe dot de | Assigned: | elixer (profile) | ||
| Status: | Closed | Package: | Reproducible crash | ||
| PHP Version: | 4.0.6 | OS: | Linux | ||
| Private report: | No | CVE-ID: | None | ||
[2001-08-15 12:00 UTC] marc dot pohl at wwf-gruppe dot de
hi, i discovered a small bug in wordwrap. if you call this function with 4 parameters and a width of 0 your php-script will crash/timeout. <pre> <?php $string = "the quick brown fox ..."; echo wordwrap($string, 0, "\n", 1),"\n"; ?> </pre> here is an inconsistency with the 2-parameter version, which returns all words separated by \n in this case regards marc
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2002-01-04 14:49 UTC] jimw@php.net