FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-151695: Fix use-after-free of the curses screen encoding (GH-151696) by miss-islington · Pull Request #151703 · python/cpython · GitHub

Repository navigation

[3.15] gh-151695: Fix use-after-free of the curses screen encoding (GH-151696) - #151703

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-551f8e1-3.15
Jun 19, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-551f8e1-3.15

Conversation

miss-islington commented Jun 19, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

The module-global curses_screen_encoding stored a borrowed pointer to the
encoding owned by the window returned by the first initscr() call. That
window can be deallocated while unctrl() and ungetch(), which have no window
of their own, still use the pointer to encode non-ASCII characters.

Keep a private copy of the encoding instead.
(cherry picked from commit 551f8e1)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

…thonGH-151696)

The module-global curses_screen_encoding stored a borrowed pointer to the
encoding owned by the window returned by the first initscr() call.  That
window can be deallocated while unctrl() and ungetch(), which have no window
of their own, still use the pointer to encode non-ASCII characters.

Keep a private copy of the encoding instead.
(cherry picked from commit 551f8e1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka enabled auto-merge (squash) June 19, 2026 08:56
serhiy-storchaka merged commit 022a018 into python:3.15 Jun 19, 2026
55 checks passed
miss-islington deleted the backport-551f8e1-3.15 branch June 19, 2026 09:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL