mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
- Fix crashbug on dtor
This commit is contained in:
@@ -181,11 +181,11 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
|
||||
timeout.tv_usec = conv % 1000000;
|
||||
/* fall-through */
|
||||
case 4:
|
||||
zval_ptr_dtor(args[3]);
|
||||
zval_dtor(*args[3]);
|
||||
ZVAL_STRING(*args[3], "", 1);
|
||||
/* fall-through */
|
||||
case 3:
|
||||
zval_ptr_dtor(args[2]);
|
||||
zval_dtor(*args[2]);
|
||||
ZVAL_LONG(*args[2], 0);
|
||||
break;
|
||||
}
|
||||
@@ -231,11 +231,11 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
|
||||
CLOSE_SOCK(1);
|
||||
|
||||
if (arg_count>2) {
|
||||
zval_ptr_dtor(args[2]);
|
||||
zval_dtor(*args[2]);
|
||||
ZVAL_LONG(*args[2], errno);
|
||||
}
|
||||
if (arg_count>3) {
|
||||
zval_ptr_dtor(args[3]);
|
||||
zval_dtor(*args[3]);
|
||||
ZVAL_STRING(*args[3], strerror(errno), 1);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
@@ -257,11 +257,11 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
|
||||
if (php_connect_nonb(socketd, (struct sockaddr *) &unix_addr, sizeof(unix_addr), &timeout) == SOCK_CONN_ERR) {
|
||||
CLOSE_SOCK(1);
|
||||
if (arg_count>2) {
|
||||
zval_ptr_dtor(args[2]);
|
||||
zval_dtor(*args[2]);
|
||||
ZVAL_LONG(*args[2], errno);
|
||||
}
|
||||
if (arg_count>3) {
|
||||
zval_ptr_dtor(args[3]);
|
||||
zval_dtor(*args[3]);
|
||||
ZVAL_STRING(*args[3], strerror(errno), 1);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user