From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:03:14 +0000 (+0100) Subject: [3.11] gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) (GH-114701) X-Git-Tag: v3.11.8~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee3ca96359a27e893e4f642b3d490a7d355f7da7;p=thirdparty%2FPython%2Fcpython.git [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 --- diff --git a/Python/import.c b/Python/import.c index 39144d302193..c4e2145a47c4 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;