diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-11-16 05:57:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-11-16 05:57:39 (GMT) |
commit | a4d33b34286e30819b36cc9e6d357d16eca813e4 (patch) | |
tree | 0a453f048b32924061fc3077bfd8218e5895e90b | |
parent | d0a5b1c3432574c248dfd86e583b5cd09503a374 (diff) | |
download | cpython-a4d33b34286e30819b36cc9e6d357d16eca813e4.zip cpython-a4d33b34286e30819b36cc9e6d357d16eca813e4.tar.gz cpython-a4d33b34286e30819b36cc9e6d357d16eca813e4.tar.bz2 |
make the PyUnicode_FSConverter cleanup set the decrefed argument to NULL (closes #25630)
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -11,6 +11,9 @@ Release date: TBA 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 38f765d..8b885df 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3614,6 +3614,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)) { |