Re: [PHP-CVS] svn: /php/php-src/trunk/main/ php_streams.h
hi Tony, I would rather do something like: #if PHP_API_VERSION < 20100412 # define PHP_OPENBASEDIR_CHECKPATH(filename) \ (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC) #else #define PHP_OPENBASEDIR_CHECKPATH(filename) \ php_check_open_basedir(filename TSRMLS_CC) #endif instead of keeping dead define in our code. Maybe rename the macro name to better reflect its goal (open basedir and safemode). Cheers, On Wed, Apr 28, 2010 at 12:36 PM, Antony Dovgal wrote: > tony2001 Wed, 28 Apr 2010 10:36:33 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=298696 > > Log: > add the constant back. quite a lot of code uses it. > > Changed paths: > U php/php-src/trunk/main/php_streams.h > > Modified: php/php-src/trunk/main/php_streams.h > === > --- php/php-src/trunk/main/php_streams.h 2010-04-28 10:11:50 UTC (rev > 298695) > +++ php/php-src/trunk/main/php_streams.h 2010-04-28 10:36:33 UTC (rev > 298696) > @@ -480,6 +480,7 @@ > #define USE_PATH 0x0001 > #define IGNORE_URL 0x0002 > #define REPORT_ERRORS 0x0008 > +#define ENFORCE_SAFE_MODE 0 /* for BC only */ > > /* If you don't need to write to the stream, but really need to > * be able to seek, use this flag in your options. */ > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ php_streams.h
tony2001 Wed, 28 Apr 2010 10:36:33 + Revision: http://svn.php.net/viewvc?view=revision&revision=298696 Log: add the constant back. quite a lot of code uses it. Changed paths: U php/php-src/trunk/main/php_streams.h Modified: php/php-src/trunk/main/php_streams.h === --- php/php-src/trunk/main/php_streams.h2010-04-28 10:11:50 UTC (rev 298695) +++ php/php-src/trunk/main/php_streams.h2010-04-28 10:36:33 UTC (rev 298696) @@ -480,6 +480,7 @@ #define USE_PATH0x0001 #define IGNORE_URL 0x0002 #define REPORT_ERRORS 0x0008 +#define ENFORCE_SAFE_MODE 0 /* for BC only */ /* If you don't need to write to the stream, but really need to * be able to seek, use this flag in your options. */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/main/ php_streams.h
cellog Fri, 31 Jul 2009 23:44:52 + Revision: http://svn.php.net/viewvc?view=revision&revision=286603 Log: fix segfault when running run-tests.php, and general potential for corruption by calling php_stream_path_encode for unicode strings, php_stream_path_param_encode decrements the refcount, but never restores it, which can cause freeing of zvals before they are done being used. Changed paths: U php/php-src/trunk/main/php_streams.h Modified: php/php-src/trunk/main/php_streams.h === --- php/php-src/trunk/main/php_streams.h2009-07-31 21:09:45 UTC (rev 286602) +++ php/php-src/trunk/main/php_streams.h2009-07-31 23:44:52 UTC (rev 286603) @@ -422,6 +422,7 @@ if (FAILURE == php_stream_path_encode(NULL, &path, &path_len, Z_USTRVAL_PP(ppzval), Z_USTRLEN_PP(ppzval), options, context)) { return FAILURE; } + Z_ADDREF_PP(ppzval); /* the conversion removes a refcount */ MAKE_STD_ZVAL(zpath); ZVAL_STRINGL(zpath, path, path_len, 0); Z_UNSET_ISREF_P(zpath); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php