Skip to content

fix integer underflow bug in ReadConsoleForTermEmulModern()#804

Merged
tgauth merged 1 commit into
PowerShell:latestw_allfrom
mgkuhn:fix-surrogate-pop
Jul 21, 2026
Merged

fix integer underflow bug in ReadConsoleForTermEmulModern()#804
tgauth merged 1 commit into
PowerShell:latestw_allfrom
mgkuhn:fix-surrogate-pop

Conversation

@mgkuhn

@mgkuhn mgkuhn commented Oct 2, 2025

Copy link
Copy Markdown

From directvt/vtm#819 (comment)

When a window resize event is received (terminal generates WINDOW_BUFFER_SIZE_EVENT event when switching between alternate/normal buffer mode), the variable text_len=0 may accidentally decrease by one and become text_len=-1

potentially fixes PowerShell/Win32-OpenSSH#2275

From directvt/vtm#819 (comment)

> When a window resize event is received (terminal generates WINDOW_BUFFER_SIZE_EVENT event when switching between alternate/normal buffer mode), the variable text_len=0 may accidentally decrease by one and become text_len=-1

potentially fixes PowerShell/Win32-OpenSSH#2275
@tgauth

tgauth commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@tgauth
tgauth merged commit 855942b into PowerShell:latestw_all Jul 21, 2026
8 checks passed
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.

Strange character sequences (ANSI escape sequences?) leaking into shell prompt when starting/attaching Tmux

2 participants