Skip to content

Commit eff667a

Browse files
wiredfoolradarhere
authored andcommitted
Mark the image read-only in the C layer if it's created from a read only buffer
1 parent 041acf1 commit eff667a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/map.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ PyImaging_MapBuffer(PyObject *self, PyObject *args) {
137137
}
138138
}
139139

140+
im->read_only = view.readonly;
140141
im->destroy = mapping_destroy_buffer;
141142

142143
Py_INCREF(target);

0 commit comments

Comments
 (0)