diff --git a/Misc/NEWS b/Misc/NEWS index 9fd194a756b..e22b40b538f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ Release date: XXXX-XX-XX Core and Builtins ----------------- +- Issue #25630: Fix a possible segfault during argument parsing in functions + that accept filesystem paths. + - Issue #23564: Fixed a partially broken sanity check in the _posixsubprocess internals regarding how fds_to_pass were passed to the child. The bug had no actual impact as subprocess.py already avoided it. diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c2b6f642c4b..47c97ccaf04 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3775,6 +3775,7 @@ PyUnicode_FSConverter(PyObject* arg, void* addr) void *data; if (arg == NULL) { Py_DECREF(*(PyObject**)addr); + *(PyObject**)addr = NULL; return 1; } if (PyBytes_Check(arg)) {