]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 29 Jan 2024 09:37:06 +0000 (12:37 +0300)
committerGitHub <noreply@github.com>
Mon, 29 Jan 2024 09:37:06 +0000 (11:37 +0200)
Python/import.c

index 2dd95d8364a0be01fd344594cf8af1a8c40369d9..2fd0c08a6bb5aec34e6452563ec652d0c83d06b6 100644 (file)
@@ -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;