Re: cvs: php-src(PHP_5_2) /ext/standard string.c

From: Date: Tue, 29 Aug 2006 12:54:25 +0000
Subject: Re: cvs: php-src(PHP_5_2) /ext/standard string.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-40158@lists.php.net to get a copy of this message
> fix win32 build > EG(precision) can be changed in runtime, even in php_implode() (hint: __toString()), so > please think twice before optimizing > > ... > > case IS_DOUBLE: { > - char stmp[MAX_LENGTH_OF_DOUBLE + EG(precision) + 1]; > + char *stmp; > + stmp = emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1); > str_len = sprintf(stmp, "%.*G", (int) EG(precision), Z_DVAL_PP(tmp)); > smart_str_appendl(&implstr, stmp, str_len); > + efree(stmp); > Well as usual critizicing the commits of others but not seeing the obvious integer overflow in memory allocation in your own commit... Stefan

« previous php.cvs (#40158) next »