https://github.com/python/cpython/commit/1ac1b2f9536a581f1656f0ac9330a7382420cda1
commit: 1ac1b2f9536a581f1656f0ac9330a7382420cda1
branch: main
author: Nikita Sobolev <[email protected]>
committer: serhiy-storchaka <[email protected]>
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;

_______________________________________________
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]

Reply via email to