mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Eliminate potentially dangerous alloca().
This commit is contained in:
parent
a41a54f7fa
commit
d5fc8152f3
1 changed files with 2 additions and 2 deletions
|
@ -1143,7 +1143,7 @@ PHP_FUNCTION(ibase_query)
|
|||
break;
|
||||
}
|
||||
} else if (bind_n > 0) {
|
||||
bind_args = (zval ***) do_alloca(sizeof(zval **) * ZEND_NUM_ARGS());
|
||||
bind_args = (zval ***) emalloc(sizeof(zval **) * ZEND_NUM_ARGS());
|
||||
|
||||
if (FAILURE == zend_get_parameters_array_ex(ZEND_NUM_ARGS(), bind_args)) {
|
||||
break;
|
||||
|
@ -1169,7 +1169,7 @@ PHP_FUNCTION(ibase_query)
|
|||
_php_ibase_free_query(&ib_query TSRMLS_CC);
|
||||
|
||||
if (bind_args) {
|
||||
free_alloca(bind_args);
|
||||
efree(bind_args);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue