gh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-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` --------- 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>
T
tigerding committed
aadda87b3d3d99cb9e8c8791bb9715a3f0209195
Parent: a3a3cf6
Committed by GitHub <noreply@github.com>
on 5/20/2025, 8:36:04 PM