8000 [3.14] gh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-134283) by miss-islington · Pull Request #134391 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.14] gh-134209: use heap-allocated memory in _curses.window.{instr,getstr} (GH-134283) #134391

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
May 20, 2025

Conversation

miss-islington
Copy link
Contributor
@miss-islington miss-islington commented May 20, 2025
  • made curses buffer heap allocated instead of stack
  • change docs to explicitly mention the max buffer size
  • changing GetStr() function to behave similarly too
  • Update Doc/library/curses.rst
  • Update instr with proper return error handling
  • Update Modules/_cursesmodule.c
  • change to strlen and better memory safety
  • change from const int to Py_ssize_t
  • add mem allocation guard
  • update versionchanged to mention it was an increase.
  • explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: python -m test -u curses test_curses


(cherry picked from commit aadda87)

Co-authored-by: tigerding 43339228+zydtiger@users.noreply.github.com
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith greg@krypto.org
Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com


📚 Documentation preview 📚: https://cpython-previews--134391.org.readthedocs.build/

…getstr}` (pythonGH-134283)

* made curses buffer heap allocated instead of stack
* change docs to explicitly mention the max buffer size
* changing GetStr() function to behave similarly too
* Update Doc/library/curses.rst
* Update instr with proper return error handling
* Update Modules/_cursesmodule.c
* change to strlen and better memory safety
* change from const int to Py_ssize_t
* add mem allocation guard
* update versionchanged to mention it was an increase.
* explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: `python -m test -u curses test_curses`

---------
(cherry picked from commit aadda87)

Co-authored-by: tigerding <43339228+zydtiger@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app bedevere-app bot added the sprint label May 20, 2025
@gpshead gpshead merged commit 04829d4 into python:3.14 May 20, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0