https://github.com/python/cpython/commit/2a1d2c83256e6445793ec8b79363e4ac4494db78 commit: 2a1d2c83256e6445793ec8b79363e4ac4494db78 branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2024-01-29T10:09:51Z summary:
[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 <[email protected]> files: M Python/import.c diff --git a/Python/import.c b/Python/import.c index 54232a130082f0..db70909982fa3e 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; _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
