From 2a1d2c83256e6445793ec8b79363e4ac4494db78 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 29 Jan 2024 11:09:51 +0100 Subject: [3.12] gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) (GH-114700) (cherry picked from commit 1ac1b2f9536a581f1656f0ac9330a7382420cda1) Co-authored-by: Nikita Sobolev --- Python/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 54232a1..db70909 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3570,7 +3570,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; -- cgit v0.12