Skip to content

Commit d3c6837

Browse files
gh-129346: Assert SQLite aggregate context cannot be NULL in the step handler
1 parent 7ec1742 commit d3c6837

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_sqlite/connection.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,7 @@ step_callback(sqlite3_context *context, int argc, sqlite3_value **params)
958958
assert(ctx != NULL);
959959

960960
aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*));
961+
assert(aggregate_instance != NULL);
961962
if (*aggregate_instance == NULL) {
962963
*aggregate_instance = PyObject_CallNoArgs(ctx->callable);
963964
if (!*aggregate_instance) {

0 commit comments

Comments
 (0)