Skip to content

[3.15] gh-161571: Fix a crash in curses.tparm() with string parameters (GH-161601) - #162558

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-2dde49a-3.15
Nov 24, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-2dde49a-3.15

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

curses passes the parameters that the format string formats with %s or %l after %p as char *, for example in the Ms capability of xterm. A non-zero integer there crashed it. It now raises TypeError.

Unlike the change in main, bytes parameters are not supported here.
(cherry picked from commit 2dde49a)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

🤖 Generated with Claude Code

…ameters (pythonGH-161601)

curses passes the parameters that the format string formats with %s or
%l after %p as char *, for example in the Ms capability of xterm.  A
non-zero integer there crashed it.  It now raises TypeError.
(cherry picked from commit 2dde49a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) November 24, 2026 14:25
@serhiy-storchaka
serhiy-storchaka merged commit 08c45ff into python:3.15 Nov 24, 2026
141 of 146 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the backport-2dde49a-3.15 branch November 25, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant