From: Meador Inge Date: Sun, 1 May 2016 02:56:59 +0000 (-0500) Subject: Issue #24114: Fix an uninitialized variable in `ctypes.util`. X-Git-Tag: v2.7.12rc1~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae21a8a555c1d9ce7e3d2dd2c15ba3675a391d58;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index 1e882e37fb1b..c437ed35e891 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -191,6 +191,7 @@ elif os.name == "posix": else: cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null' + paths = None for line in os.popen(cmd).readlines(): line = line.strip() if line.startswith('Default Library Path (ELF):'): diff --git a/Misc/NEWS b/Misc/NEWS index ea36439efd30..e521ae1488f6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -77,6 +77,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, 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 Zhang.