Message235011
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.) |
|
Date |
User |
Action |
Args |
2015-01-30 01:07:08 | rhansen | set | recipients:
+ rhansen |
2015-01-30 01:07:08 | rhansen | set | messageid: <1422580028.66.0.282678068687.issue23349@psf.upfronthosting.co.za> |
2015-01-30 01:07:08 | rhansen | link | issue23349 messages |
2015-01-30 01:07:08 | rhansen | create | |
|