Skip to content

Commit f1e2671

Browse files
committed
Issue python#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.
2 parents 51b697b + 8988ebf commit f1e2671

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Lib/ctypes/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def _findLib_crle(name, is64):
184184
else:
185185
cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
186186

187+
paths = None
187188
with contextlib.closing(os.popen(cmd)) as f:
188189
for line in f.readlines():
189190
line = line.strip()

Misc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ Core and Builtins
256256
Library
257257
-------
258258

259+
- Issue #24114: Fix an uninitialized variable in `ctypes.util`.
260+
261+
The bug only occurs on SunOS when the ctypes implementation searches
262+
for the `crle` program. Patch by Xiang Zhang. Tested on SunOS by
263+
Kees Bos.
264+
259265
- Issue #26864: In urllib.request, change the proxy bypass host checking
260266
against no_proxy to be case-insensitive, and to not match unrelated host
261267
names that happen to have a bypassed hostname as a suffix. Patch by Xiang

0 commit comments

Comments
 (0)