mirror of https://github.com/python/cpython
Patch #1232023: Don't include empty path component from registry,
so that the current directory does not get added to sys.path. Also fixes #1526785.
This commit is contained in:
parent
bda0dde1c4
commit
d22968af17
|
@ -12,6 +12,9 @@ What's New in Python 2.5 release candidate 1?
|
|||
Core and builtins
|
||||
-----------------
|
||||
|
||||
- Patch #1232023: Stop including current directory in search
|
||||
path on Windows.
|
||||
|
||||
- Fix some potential crashes found with failmalloc.
|
||||
|
||||
- Fix warnings reported by Klocwork's static analysis tool.
|
||||
|
|
|
@ -297,6 +297,10 @@ getpythonregpath(HKEY keyBase, int skipcore)
|
|||
}
|
||||
RegCloseKey(subKey);
|
||||
}
|
||||
|
||||
/* return null if no path to return */
|
||||
if (dataSize == 0) goto done;
|
||||
|
||||
/* original datasize from RegQueryInfo doesn't include the \0 */
|
||||
dataBuf = malloc((dataSize+1) * sizeof(TCHAR));
|
||||
if (dataBuf) {
|
||||
|
|
Loading…
Reference in New Issue