diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-01-29 11:03:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-29 10:03:14 +0000 |
| commit | ee3ca96359a27e893e4f642b3d490a7d355f7da7 (patch) | |
| tree | 38d1e1497e5ce566fe9d011143c2b9129e6d14b0 /Python | |
| parent | 9fd8aaab8314924c0af41d0a03c5140f42f52d9d (diff) | |
| download | python-ee3ca96359a27e893e4f642b3d490a7d355f7da7.tar.gz python-ee3ca96359a27e893e4f642b3d490a7d355f7da7.zip | |
[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>
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 39144d30219..c4e2145a47c 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; |
