diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2024-01-29 12:37:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-29 11:37:06 +0200 |
commit | 1ac1b2f9536a581f1656f0ac9330a7382420cda1 (patch) | |
tree | c7159ec8d88f48c39c34ca292260e97012af25e2 /Python/import.c | |
parent | 2124a3ddcc0e274521f74d239f0e94060e17dd7f (diff) | |
download | cpython-1ac1b2f9536a581f1656f0ac9330a7382420cda1.tar.gz cpython-1ac1b2f9536a581f1656f0ac9330a7382420cda1.zip |
gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686)
Diffstat (limited to 'Python/import.c')
-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 2dd95d8364a..2fd0c08a6bb 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; |