Skip to content

Fix potential crash while exiting console version of K95#528

Draft
davidrg wants to merge 1 commit intomasterfrom
console-exit-crash-fix
Draft

Fix potential crash while exiting console version of K95#528
davidrg wants to merge 1 commit intomasterfrom
console-exit-crash-fix

Conversation

@davidrg
Copy link
Copy Markdown
Owner

@davidrg davidrg commented Apr 25, 2026

While K95 is exiting, Windows can report a buffer size larger than what K95 supports. As TermScrnUpd only allocates a buffer large enough for the maximum terminal dimensions supported by K95, this larger size reported by Windows can cause TermScrnUpd to overrun its buffer.

This bug is reproduceable on versions of K95 going back to 1.1.17, though its possible that the console environment changes introduced with Windows 10 v1809 are what makes it possible to trigger.

While K95 is exiting, Windows can report a buffer size larger than what K95 supports. As TermScrnUpd only allocates a buffer large enough for the maximum terminal dimensions supported by K95, this larger size reported by Windows can cause TermScrnUpd to overrun its buffer.

This bug is reproduceable on versions of K95 going back to 1.1.17, though its possible that the console environment changes introduced with Windows 10 v1809 are what makes it possible to trigger.
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