[Python-Dev] Re: python/dist/src/Objects unicodeobject.c, 2.228, 2.229

M.-A. Lemburg mal at egenix.com
Fri Oct 15 10:05:30 CEST 2004


Fredrik Lundh wrote:
>>Applied patch for [ 1047269 ] Buffer overwrite in PyUnicode_AsWideChar.
>>
>>Python 2.3.x candidate.
> 
> 
> why bother?
> 
> the unicode object you're copying to holds size+1 characters, so all the
> code does is copying an extra NULL character...  completely harmless.

That's true for Py_UNICODE, but not necessarily for the
wchar_t* buffer your dealing with.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Oct 15 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-Dev mailing list