changeset: 99151:3ae62099d70b branch: 3.5 parent: 99149:55f7a99a5433 user: Benjamin Peterson date: Sun Nov 15 21:57:39 2015 -0800 files: Misc/NEWS Objects/unicodeobject.c description: make the PyUnicode_FSConverter cleanup set the decrefed argument to NULL (closes #25630) diff -r 55f7a99a5433 -r 3ae62099d70b Misc/NEWS --- a/Misc/NEWS Sun Nov 15 21:15:26 2015 -0800 +++ b/Misc/NEWS Sun Nov 15 21:57:39 2015 -0800 @@ -11,6 +11,9 @@ 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 -r 55f7a99a5433 -r 3ae62099d70b Objects/unicodeobject.c --- a/Objects/unicodeobject.c Sun Nov 15 21:15:26 2015 -0800 +++ b/Objects/unicodeobject.c Sun Nov 15 21:57:39 2015 -0800 @@ -3614,6 +3614,7 @@ void *data; if (arg == NULL) { Py_DECREF(*(PyObject**)addr); + *(PyObject**)addr = NULL; return 1; } if (PyBytes_Check(arg)) {