[PR #14275] AtlasEngine: Fix a heap overflow bug #30042

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

Original Pull Request: https://github.com/microsoft/terminal/pull/14275

State: closed
Merged: Yes


TextBuffer is buggy and allows a Trailing DbcsAttribute to be written
into the first column. Since other code then blindly assumes that there's a
preceding Leading character, we'll get called with a X coordinate of -1.
This issue will be fixed by #13626 and this commit fixes it in the meantime.

Additionally fixes an unimportant crash when the window height is 0px,
because it was annoying during testing and doesn't hurt to be fixed.

Validation Steps Performed

  • Run a stress test that prints random Unicode at random positions
  • Resize the window furiously at the same time
  • Doesn't crash / fail-fast
**Original Pull Request:** https://github.com/microsoft/terminal/pull/14275 **State:** closed **Merged:** Yes --- `TextBuffer` is buggy and allows a `Trailing` `DbcsAttribute` to be written into the first column. Since other code then blindly assumes that there's a preceding `Leading` character, we'll get called with a X coordinate of -1. This issue will be fixed by #13626 and this commit fixes it in the meantime. Additionally fixes an unimportant crash when the window height is 0px, because it was annoying during testing and doesn't hurt to be fixed. ## Validation Steps Performed * Run a stress test that prints random Unicode at random positions * Resize the window furiously at the same time * Doesn't crash / fail-fast ✅
claunia added the pull-request label 2026-01-31 09:38:19 +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#30042