mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
Fixed usage after free()
This commit is contained in:
parent
d81b287ce1
commit
4e291fab81
@ -627,12 +627,13 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
|
||||
TSRMLS_FETCH();
|
||||
|
||||
convert_object_to_type(op, &dst, IS_STRING, convert_to_string);
|
||||
zval_dtor(op);
|
||||
|
||||
if (Z_TYPE(dst) == IS_STRING) {
|
||||
zval_dtor(op);
|
||||
ZVAL_COPY_VALUE(op, &dst);
|
||||
} else {
|
||||
zend_error(E_NOTICE, "Object of class %s to string conversion", Z_OBJCE_P(op)->name->val);
|
||||
zval_dtor(op);
|
||||
ZVAL_NEW_STR(op, STR_INIT("Object", sizeof("Object")-1, 0));
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user