[Python-bugs-list] [Bug #131064] sys.path not set correctly in embedded python interpreter.

noreply@sourceforge.net noreply@sourceforge.net
Mon, 05 Feb 2001 01:54:16 -0800


Bug #131064, was updated on 2001-Feb-05 01:54
Here is a current snapshot of the bug.

Project: Python
Category: Python Interpreter Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Submitted by: theller
Assigned to : nobody
Summary: sys.path not set correctly in embedded python interpreter.

Details: sys.path is not set correctly in an embedded python interpreter
under the following conditions:
- win98, win95 (NOT NT or win2000)
- There are no subkeys present in the registry under
HKLM\Software\Python\PythonCore\x.x\PythonPath
  (in other words, win32all is NOT installed)

The call to 
			rc = RegQueryValueEx(newKey, NULL, 0, NULL, 
			                     (LPBYTE)szCur, &dataSize);
in PC\getpathp.c, line 307 fails with error code 234 (More data is
available).
There is no check for an error.
The result is that pythonpath is not zero terminated, and contains
garbage.
The call fails because the buffer size specified in dataSize is one byte
too small.
It does not fail on NT or 2000, because dataSize (as got by the call to
RegQueryInfoKey)
seems to be enough for a UNICODE string.

This bug is also already in Python2.0.


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=131064&group_id=5470