Re: Re: [PATCH] rev. 2 of my apache2filters SEGV fixes

From: Date: Thu, 11 Apr 2002 16:26:42 +0000
Subject: Re: Re: [PATCH] rev. 2 of my apache2filters SEGV fixes
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-82587@lists.php.net to get a copy of this message
On Thu, Apr 11, 2002 at 08:58:43PM +1000, Brian Havard wrote: > Well, actually, that's quite possible (I only just upgraded my GD library > to support JPEG). Inside the GD library (gd_jpeg.c:702 in GD 1.8.4) it > compares the return value of gdPutBuf() to the requested write size & > aborts if it doesn't match. This value is ultimately the return value of > php_apache_sapi_ub_write() which tells me that it should be returning the > number of bytes written. The call stack actually looks like this: > > [...] > empty_output_buffer > gdPutBuf > _php_image_output_putbuf > php_write > php_body_write > php_ub_body_write > php_ub_body_write_no_header > php_apache_sapi_ub_write > > When I change php_apache_sapi_ub_write() to return str_length instead of 0 > (after the new patch so str_length is the full write size) the JPEG is > written in full rather than just the first 4k. Yes, after looking at other modules it appears you are correct and it was just broken before. I'll change it to return the number of consumed bytes. -aaron

« previous php.dev (#82587) next »