Bug #12768: wordwrap crashes with 4 parameters and width=0
| From: | marc dot pohl at wwf-gruppe dot de | Date: | Wed, 15 Aug 2001 16:00:10 +0000 |
| Subject: | Bug #12768: wordwrap crashes with 4 parameters and width=0 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-63293@lists.php.net to get a copy of this message | ||
From: marc.pohl@wwf-gruppe.de
Operating system: Linux
PHP version: 4.0.6
PHP Bug Type: Reproducible crash
Bug description: wordwrap crashes with 4 parameters and width=0
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
--
Edit bug report at: http://bugs.php.net/?id=12768&edit=1