[Python-checkins] r50796 - in python/trunk: Misc/NEWS PC/getpathp.c
martin.v.loewis
python-checkins at python.org
Mon Jul 24 13:54:54 CEST 2006
Author: martin.v.loewis
Date: Mon Jul 24 13:54:53 2006
New Revision: 50796
Modified:
python/trunk/Misc/NEWS
python/trunk/PC/getpathp.c
Log:
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.
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Mon Jul 24 13:54:53 2006
@@ -12,6 +12,9 @@
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.
Modified: python/trunk/PC/getpathp.c
==============================================================================
--- python/trunk/PC/getpathp.c (original)
+++ python/trunk/PC/getpathp.c Mon Jul 24 13:54:53 2006
@@ -297,6 +297,10 @@
}
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) {
More information about the Python-checkins
mailing list