[issue25778] winreg.EnumValue does not truncate strings correctly

Eryk Sun report at bugs.python.org
Fri Jan 1 18:40:03 EST 2016


Eryk Sun added the comment:

The current test works for 3.x because we keep the full string length via PyUnicode_AsWideCharString(value, &len) when creating a REG_SZ value. OTOH, 2.x Py2Reg gets the length via strlen. I'd prefer to make this consistent with 3.x by using the full string length from PyString_AsStringAndSize. Expanding the range of supported values is less disruptive to existing code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25778>
_______________________________________


More information about the Python-bugs-list mailing list