mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Fix #53551 (PDOStatement execute segfaults for pdo_mysql driver)
This commit is contained in:
parent
6553823c8b
commit
22b42afaee
3 changed files with 78 additions and 2 deletions
|
@ -142,8 +142,7 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC)
|
|||
/* (re)bind the parameters */
|
||||
if (mysql_stmt_bind_param(S->stmt, S->params) || mysql_stmt_execute(S->stmt)) {
|
||||
if (S->params) {
|
||||
efree(S->params);
|
||||
S->params = 0;
|
||||
memset(S->params, 0, S->num_params * sizeof(MYSQL_BIND));
|
||||
}
|
||||
pdo_mysql_error_stmt(stmt);
|
||||
if (mysql_stmt_errno(S->stmt) == 2057) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue