Skip to content

Commit 555e652

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: ext/sqlite3: fix wrong pointer types passed to the free list comparator.
2 parents 3c68fa9 + 7744eab commit 555e652

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/sqlite3/sqlite3.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ZEND_DECLARE_MODULE_GLOBALS(sqlite3)
3838
static PHP_GINIT_FUNCTION(sqlite3);
3939
static int php_sqlite3_authorizer(void *autharg, int action, const char *arg1, const char *arg2, const char *arg3, const char *arg4);
4040
static void sqlite3_param_dtor(zval *data);
41-
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, sqlite3_stmt *statement);
41+
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, php_sqlite3_stmt *statement);
4242
static zend_always_inline void php_sqlite3_fetch_one(int n_cols, php_sqlite3_result *result_obj, zend_long mode, zval *result);
4343

4444
#define SQLITE3_CHECK_INITIALIZED(db_obj, member, class_name) \
@@ -2120,7 +2120,7 @@ PHP_METHOD(SQLite3Result, finalize)
21202120

21212121
/* We need to finalize an internal statement */
21222122
if (!result_obj->is_prepared_statement) {
2123-
zend_llist_del_element(&(result_obj->db_obj->free_list), &result_obj->stmt_obj,
2123+
zend_llist_del_element(&(result_obj->db_obj->free_list), result_obj->stmt_obj,
21242124
(int (*)(void *, void *)) php_sqlite3_compare_stmt_free);
21252125
} else {
21262126
sqlite3_reset(result_obj->stmt_obj->stmt);
@@ -2235,9 +2235,9 @@ static void php_sqlite3_free_list_dtor(void **item)
22352235
}
22362236
/* }}} */
22372237

2238-
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, sqlite3_stmt *statement ) /* {{{ */
2238+
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, php_sqlite3_stmt *statement ) /* {{{ */
22392239
{
2240-
return ((*stmt_obj_ptr)->initialised && statement == (*stmt_obj_ptr)->stmt);
2240+
return ((*stmt_obj_ptr)->initialised && statement == *stmt_obj_ptr);
22412241
}
22422242
/* }}} */
22432243

@@ -2351,7 +2351,7 @@ static void php_sqlite3_stmt_object_free_storage(zend_object *object) /* {{{ */
23512351
}
23522352

23532353
if (intern->initialised) {
2354-
zend_llist_del_element(&(intern->db_obj->free_list), intern->stmt,
2354+
zend_llist_del_element(&(intern->db_obj->free_list), intern,
23552355
(int (*)(void *, void *)) php_sqlite3_compare_stmt_free);
23562356
}
23572357

0 commit comments

Comments
 (0)