https://github.com/python/cpython/commit/ee3ca96359a27e893e4f642b3d490a7d355... commit: ee3ca96359a27e893e4f642b3d490a7d355f7da7 branch: 3.11 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: serhiy-storchaka <storchaka@gmail.com> date: 2024-01-29T10:03:14Z summary: [3.11] gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) (GH-114701) (cherry picked from commit 1ac1b2f9536a581f1656f0ac9330a7382420cda1) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> files: M Python/import.c diff --git a/Python/import.c b/Python/import.c index 39144d302193ac..c4e2145a47c4d2 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2194,7 +2194,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;