New submission from STINNER Victor <victor.stin...@haypocalc.com>:

getbuffer() checks that the buffer is contiguous. "s#", "y", "z" formats use 
convertbuffer() which doesn't check that the buffer is contigious, as "w" and 
"w#" formats which call directly PyObject_GetBuffer() which extra check.

I don't think that the functions using these format support discontiguous 
buffers. I cannot check because I don't know how to create such buffer. It 
would be safer to reject discontigious buffer.

If a function would like to support discontigious buffer, it should use "O" 
format, call PyObject_GetBuffer() with the right option and do its own checks 
on the buffer object.

----------
components: Interpreter Core
messages: 107749
nosy: haypo
priority: normal
severity: normal
status: open
title: PyArg_Parse*() functions: reject discontinious buffers
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8991>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to