Skip to content

gh-114685: Check flags in PyObject_GetBuffer() #114707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 29, 2024

PyObject_GetBuffer() now raises a SystemError if called with PyBUF_READ or PyBUF_WRITE as flags. These flags should only be used with the PyMemoryView_* C API.

PyObject_GetBuffer() now raises a SystemError if called with
PyBUF_READ or PyBUF_WRITE as flags. These flags should
only be used with the PyMemoryView_* C API.
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 👍

@serhiy-storchaka serhiy-storchaka merged commit b7688ef into python:main Jan 31, 2024
@serhiy-storchaka serhiy-storchaka deleted the buffer-invalid-flags branch January 31, 2024 11:11
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
PyObject_GetBuffer() now raises a SystemError if called with
PyBUF_READ or PyBUF_WRITE as flags. These flags should
only be used with the PyMemoryView_* C API.
hroncok added a commit to hroncok/pycairo that referenced this pull request May 29, 2024
Since Python 3.13, the flag is no longer allowed.

See python/cpython#114707

Fixes pygobject#365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants