[PR #4021] [MERGED] Fix a crash when calling SetConsoleScreenBufferSize in conpty #25600

Open
opened 2026-01-31 09:10:32 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4021
Author: @zadjii-msft
Created: 12/19/2019
Status: ✅ Merged
Merged: 12/31/2019
Merged by: @miniksa

Base: master ← Head: dev/migrie/b/3907-conpty-explodes-often


📝 Commits (2)

  • 8696669 Fix a crash when calling SetConsoleScreenBufferSize in conpty
  • 073a0dd Merge remote-tracking branch 'origin/master' into dev/migrie/b/3907-conpty-explodes-often

📊 Changes

1 file changed (+6 additions, -6 deletions)

View changed files

📝 src/host/getset.cpp (+6 -6)

📄 Description

Summary of the Pull Request

Fixes the bug @DHowett-MSFT found in conpty. Before conpty, this check was all one statement. With the addition of conpty, that statement was moved into a "am I not headless" check, to not restrict the conpty size based on the window size. However, the "is the user trying to resize the buffer smaller than the viewport" should have been done outside the headless check. This just splits that statement up.

PR Checklist

Validation Steps Performed

Ran the tiny repro program Dustin provided - we no longer crash.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/4021 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 12/19/2019 **Status:** ✅ Merged **Merged:** 12/31/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `dev/migrie/b/3907-conpty-explodes-often` --- ### 📝 Commits (2) - [`8696669`](https://github.com/microsoft/terminal/commit/869666952196b09c1e1c78b75eb526d07e30ed54) Fix a crash when calling SetConsoleScreenBufferSize in conpty - [`073a0dd`](https://github.com/microsoft/terminal/commit/073a0dd6c453910bc6cc31a1b8b9f31035a0f61c) Merge remote-tracking branch 'origin/master' into dev/migrie/b/3907-conpty-explodes-often ### 📊 Changes **1 file changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/host/getset.cpp` (+6 -6) </details> ### 📄 Description ## Summary of the Pull Request Fixes the bug @DHowett-MSFT found in conpty. Before conpty, this check was all one statement. With the addition of conpty, that statement was moved into a "am I not headless" check, to not restrict the conpty size based on the window size. However, the "is the user trying to resize the buffer smaller than the viewport" should have been done outside the headless check. This just splits that statement up. ## PR Checklist * [x] Closes #3907 * [x] I work here * [ ] I didn't add tests, since that's being tracked in #3941 * [n/a] Requires documentation to be updated ## Validation Steps Performed Ran the tiny repro program Dustin provided - we no longer crash. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:10:32 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25600