From 8988ebf2a7a89620781feca39074f91469e7baf2 Mon Sep 17 00:00:00 2001 From: Meador Inge Date: Sat, 30 Apr 2016 21:56:59 -0500 Subject: [PATCH] Issue #24114: Fix an uninitialized variable in `ctypes.util`. The bug only occurs on SunOS when the ctypes implementation searches for the `crle` program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos. --- Lib/ctypes/util.py | 1 + Misc/NEWS | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 9e74ccdbcf4..8ff4aff0ca5 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -184,6 +184,7 @@ elif os.name == "posix": else: cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null' + paths = None with contextlib.closing(os.popen(cmd)) as f: for line in f.readlines(): line = line.strip() diff --git a/Misc/NEWS b/Misc/NEWS index 67c2a17e5d1..89403b04e89 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -107,6 +107,12 @@ Core and Builtins Library ------- +- Issue #24114: Fix an uninitialized variable in `ctypes.util`. + + The bug only occurs on SunOS when the ctypes implementation searches + for the `crle` program. Patch by Xiang Zhang. Tested on SunOS by + Kees Bos. + - Issue #26864: In urllib.request, change the proxy bypass host checking against no_proxy to be case-insensitive, and to not match unrelated host names that happen to have a bypassed hostname as a suffix. Patch by Xiang