summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-01-29 10:09:51 (GMT)
committerGitHub <noreply@github.com>2024-01-29 10:09:51 (GMT)
commit2a1d2c83256e6445793ec8b79363e4ac4494db78 (patch)
treebf02afa3b089bb9aa006938a3cc56bb0edff602b /Python
parent930f805e72587655cd4c2a7c0f28125bde234914 (diff)
downloadcpython-2a1d2c83256e6445793ec8b79363e4ac4494db78.zip
cpython-2a1d2c83256e6445793ec8b79363e4ac4494db78.tar.gz
cpython-2a1d2c83256e6445793ec8b79363e4ac4494db78.tar.bz2
[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 <mail@sobolevn.me>
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 54232a1..db70909 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;