]> granicus.if.org Git - python/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 1e882e37fb1bd4d74472afdc49d6f02562429ec0..c437ed35e89164bc836fac8f14d6d633afab8534 100644 (file)
@@ -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):'):
index ea36439efd301ded2001c34bf26e4b3079440a62..e521ae1488f641e7b962832dfd804c8573bf1273 100644 (file)
--- 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.