hholzgra Thu May 29 16:19:04 2003 EDT Modified files: /php4/main/streams userspace.c Log: fix for crashbug with user level wrapper implementations of stream_stat Index: php4/main/streams/userspace.c diff -u php4/main/streams/userspace.c:1.6 php4/main/streams/userspace.c:1.7 --- php4/main/streams/userspace.c:1.6 Tue May 20 09:09:11 2003 +++ php4/main/streams/userspace.c Thu May 29 16:19:03 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: userspace.c,v 1.6 2003/05/20 13:09:11 hholzgra Exp $ */ +/* $Id: userspace.c,v 1.7 2003/05/29 20:19:03 hholzgra Exp $ */ #include "php.h" #include "php_globals.h" @@ -630,17 +630,16 @@ return 0; } - /* parse the return value from one of the stat functions and store the * relevant fields into the statbuf provided */ static int statbuf_from_array(zval *array, php_stream_statbuf *ssb TSRMLS_DC) { - zval *elem; + zval **elem; #define STAT_PROP_ENTRY_EX(name, name2) \ if (SUCCESS == zend_hash_find(Z_ARRVAL_P(array), #name, sizeof(#name), (void**)&elem)) { \ - convert_to_long(elem); \ - ssb->sb.st_##name2 = Z_LVAL_P(elem); \ + convert_to_long(*elem); \ + ssb->sb.st_##name2 = Z_LVAL_PP(elem); \ } #define STAT_PROP_ENTRY(name) STAT_PROP_ENTRY_EX(name,name) @@ -701,7 +700,7 @@ us->wrapper->classname); } } - + if (retval) zval_ptr_dtor(&retval);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php