Re: [PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread Jim Winstead
On Mon, Mar 18, 2002 at 12:34:12AM +, Wez Furlong wrote: > debug("wordwrap: char=" . ord($char) . " cut=" . $cut); you must be using a multi-character linebreak (probably "\r\n"). otherwise the allocation that is being overflown would not be made ('cause it is in the multi-character-line-en

Re: [PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread Wez Furlong
On 18/03/02, "Jim Winstead" <[EMAIL PROTECTED]> wrote: > the easiest way to track it down would be to insert some debugging > statements in the wordwrap() function to print out the text being > wrapped, the newtextlen that gets calculated, and then value of > newtextlen at the end of the function.

Re: [PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread Wez Furlong
On 18/03/02, "Jim Winstead" <[EMAIL PROTECTED]> wrote: > Wez Furlong <[EMAIL PROTECTED]> wrote: > > I'll see if I can force it to happen in isolation. > are you passing a fourth parameter to wordwrap? Yes; it's always 0. > the easiest way to track it down would be to insert some debugging > sta

Re: [PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread Jim Winstead
Wez Furlong <[EMAIL PROTECTED]> wrote: > I'll see if I can force it to happen in isolation. are you passing a fourth parameter to wordwrap? the easiest way to track it down would be to insert some debugging statements in the wordwrap() function to print out the text being wrapped, the newtextlen

Re: [PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread Wez Furlong
Hi Derick, I'm afraid I can't; it's part of this web based email system and it's just a bit too complicated. It's only occasional, and it seems to be only when it actually does the wrapping. A bit lame I'm afraid :-/ I'll see if I can force it to happen in isolation. --Wez. On 18/03/02, [E

Re: [PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread derick
Hey, can you send me/the list a small reproducing example? Derick On Sun, 17 Mar 2002, Wez Furlong wrote: > Can anyone else verify this: > > /home/wez/src/php/PHPDEV/Zend/zend_execute_API.c(274) : Block 0x08C56B88 status: > /home/wez/src/php/PHPDEV/Zend/zend_variables.c(44) : Actual location

[PHP-DEV] 1 byte overflow in wordwrap

2002-03-17 Thread Wez Furlong
Can anyone else verify this: /home/wez/src/php/PHPDEV/Zend/zend_execute_API.c(274) : Block 0x08C56B88 status: /home/wez/src/php/PHPDEV/Zend/zend_variables.c(44) : Actual location (location was relayed) Beginning: OK (allocated on /home/wez/src/php/PHPDEV/ext/standard/string.c:670, 142 byte