Fixed bug #46086 (Segfault when accessing fileinfo class property)

This commit is contained in:
Scott MacVicar 2008-09-15 22:13:25 +00:00
parent 8bb2465a51
commit db907e5bc3
2 changed files with 8 additions and 9 deletions

3
NEWS
View File

@ -2,9 +2,12 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, PHP 5.3.0 Alpha 3
- Upgraded bundled PCRE to version 7.8. (Nuno)
- Upgraded bundled sqlite to version 3.6.2. (Scott)
- Changed error level E_ERROR into E_WARNING in Soap extension methods
parameter validation. (Felipe)
- Fixed bug #46086 (Segfault when accessing fileinfo class properties).
(Scott)
- Fixed bug #46072 (Compile failure under IRIX 6.5.30 building util.c) (Greg)
- Fixed bug #46060 (Phar::addEmptyDir() breaks) (Greg)
- Fixed bug #46042 (memory leaks with reflection of mb_convert_encoding()).

View File

@ -100,15 +100,11 @@ PHP_FILEINFO_API zend_object_value finfo_objects_new(zend_class_entry *class_typ
zend_object_value retval;
struct finfo_object *intern;
intern = ecalloc(1, sizeof(struct finfo_object));
intern->zo.ce = class_type;
intern->zo.properties = NULL;
#if ZEND_MODULE_API_NO >= 20050922
intern->zo.guards = NULL;
#else
intern->zo.in_get = 0;
intern->zo.in_set = 0;
#endif
intern = emalloc(sizeof(struct finfo_object));
zend_object_std_init(&intern->zo, class_type TSRMLS_CC);
zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &tmp, sizeof(zval *));
intern->ptr = NULL;
retval.handle = zend_objects_store_put(intern, finfo_objects_dtor, NULL, NULL TSRMLS_CC);