mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
[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>
This commit is contained in:
parent
9fd8aaab83
commit
ee3ca96359
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user