]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #24114: Fix an uninitialized variable in `ctypes.util`.
authorMeador Inge <meadori@gmail.com>
Sun, 1 May 2016 02:56:59 +0000 (21:56 -0500)
committerMeador Inge <meadori@gmail.com>
Sun, 1 May 2016 02:56:59 +0000 (21:56 -0500)
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
Misc/NEWS

index 9e74ccdbcf40d720957c82188aa2c338876eee64..8ff4aff0ca517e1f88139d1bd4c634ccac05da69 100644 (file)
@@ -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()
index 67c2a17e5d18f2ef9900e4fa2e3850e52a57640c..89403b04e89c74a6fcc21a94ef53e23fc36fe4cd 100644 (file)
--- 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