diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-18 18:57:52 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-18 18:57:52 (GMT) |
commit | ad62b03949eca11677fd55df2f8d5f7ef5f504e8 (patch) | |
tree | 551fbc324e700f5cb526e2a31c8a5540015aa1a1 /Objects/memoryobject.c | |
parent | c8a16867f69c1a28ee6804bb71d67ac5d82fe4d8 (diff) | |
download | cpython-ad62b03949eca11677fd55df2f8d5f7ef5f504e8.zip cpython-ad62b03949eca11677fd55df2f8d5f7ef5f504e8.tar.gz cpython-ad62b03949eca11677fd55df2f8d5f7ef5f504e8.tar.bz2 |
Issue #10451: memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
Diffstat (limited to 'Objects/memoryobject.c')
-rw-r--r-- | Objects/memoryobject.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index a05b97b..7782076 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -52,9 +52,6 @@ memory_getbuf(PyMemoryViewObject *self, Py_buffer *view, int flags) { int res = 0; CHECK_RELEASED_INT(self); - /* XXX for whatever reason fixing the flags seems necessary */ - if (self->view.readonly) - flags &= ~PyBUF_WRITABLE; if (self->view.obj != NULL) res = PyObject_GetBuffer(self->view.obj, view, flags); if (view) |