Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89413bb

Browse filesBrowse files
authored
gh-101967: add a missing error check (#101968)
1 parent 7f1c721 commit 89413bb
Copy full SHA for 89413bb

File tree

Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix possible segfault in ``positional_only_passed_as_keyword`` function, when new list created.

‎Python/ceval.c

Copy file name to clipboardExpand all lines: Python/ceval.c
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,9 @@ positional_only_passed_as_keyword(PyThreadState *tstate, PyCodeObject *co,
12551255
{
12561256
int posonly_conflicts = 0;
12571257
PyObject* posonly_names = PyList_New(0);
1258-
1258+
if (posonly_names == NULL) {
1259+
goto fail;
1260+
}
12591261
for(int k=0; k < co->co_posonlyargcount; k++){
12601262
PyObject* posonly_name = PyTuple_GET_ITEM(co->co_localsplusnames, k);
12611263

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.