Author rhansen
Recipients rhansen
Date 2015-01-30.01:07:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422580028.66.0.282678068687.issue23349@psf.upfronthosting.co.za>
In-reply-to
Content
PyBuffer_ToContiguous() has an off-by-one error when copying a buffer it thinks is non-contiguous.

To reproduce, put the following in foo.pyx and compile with Cython v0.21.2:

    cpdef foo():
        cdef unsigned char[:] v = bytearray("testing")
        print repr(memoryview(v).tobytes())

>>> import foo
>>> foo.foo()
'estingt'

(This issue was fixed for Python 3.x in issue #12834 but it was not fixed for Python 2.7.)
History
Date User Action Args
2015-01-30 01:07:08rhansensetrecipients: + rhansen
2015-01-30 01:07:08rhansensetmessageid: <1422580028.66.0.282678068687.issue23349@psf.upfronthosting.co.za>
2015-01-30 01:07:08rhansenlinkissue23349 messages
2015-01-30 01:07:08rhansencreate