gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686)
https://github.com/python/cpython/commit/1ac1b2f9536a581f1656f0ac9330a738242... commit: 1ac1b2f9536a581f1656f0ac9330a7382420cda1 branch: main author: Nikita Sobolev <mail@sobolevn.me> committer: serhiy-storchaka <storchaka@gmail.com> date: 2024-01-29T11:37:06+02:00 summary: gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) files: M Python/import.c diff --git a/Python/import.c b/Python/import.c index 2dd95d8364a0be..2fd0c08a6bb5ae 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3544,7 +3544,7 @@ _imp_get_frozen_object_impl(PyObject *module, PyObject *name, struct frozen_info info = {0}; Py_buffer buf = {0}; if (PyObject_CheckBuffer(dataobj)) { - if (PyObject_GetBuffer(dataobj, &buf, PyBUF_READ) != 0) { + if (PyObject_GetBuffer(dataobj, &buf, PyBUF_SIMPLE) != 0) { return NULL; } info.data = (const char *)buf.buf;
participants (1)
-
serhiy-storchaka