On Wed, Jan 15, 2003 at 06:36:20PM +0100, Harald Radi wrote: > iirc the reason why i changed it to unsigned was that actually the zend engine > treated it as unsigned everywhere but in that particular struct. i also > remember that i discussed that with andi and that he agreed to change this in > the ze2 cvs module and that the extensions should be *fixed*. i agree that it > doesn't make any sense to mix types. changing it to uint means to fix all the > extensions, changing it to int means to fix the engine (and not just to revert > my patch).
While I think changing the len field to unsigned or size_t itself is a good idea, it is also the case that there're certain security risks that should have been considered. IMHO as long as no one is likely to agree the idea to either modify Z_STRLEN macro or make a new macro Z_SAFE_STRLEN so that it would force the engine to bail out when the length exceeds the maximam value of signed integer (or possibly signed short) like Sascha said, more priority has to be taken on fixing the engine over the former because it hardly seems the change has been known by the numerous extension developers. Moriyoshi -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php