[PR #13271] Fix uninitialized memory bug in GdiEngine #29461

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

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

State: closed
Merged: Yes


ed27737 contains a regression were a RECT in GdiEngine wasn't properly
initialized anymore. Due to this, rendering during scrolling behaved erratic.

To find other cases of this bug in ed27737 the following regex was used:

^-.* = \{\s*\d*\s*\};

It appears that only GdiEngine was affected by a bug of this kind,
but just to be sure, this PR reverts all other instances.
This bug was likely caused when I tried to undo some of the changes in
ed27737 to make the PR smaller, but failed to revert the code properly.

PR Checklist

Validation Steps Performed

I'm unable to reproduce the issue on my hardware and am unable to test
this change, but the uninitialized struct is clearly a bug regardless.

Co-authored-by: James Holderness j4_james@hotmail.com

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13271 **State:** closed **Merged:** Yes --- ed27737 contains a regression were a `RECT` in `GdiEngine` wasn't properly initialized anymore. Due to this, rendering during scrolling behaved erratic. To find other cases of this bug in ed27737 the following regex was used: ``` ^-.* = \{\s*\d*\s*\}; ``` It appears that only `GdiEngine` was affected by a bug of this kind, but just to be sure, this PR reverts all other instances. This bug was likely caused when I tried to undo some of the changes in ed27737 to make the PR smaller, but failed to revert the code properly. ## PR Checklist * [x] Closes #13270 * [x] I work here ## Validation Steps Performed I'm unable to reproduce the issue on my hardware and am unable to test this change, but the uninitialized struct is clearly a bug regardless. Co-authored-by: James Holderness <j4_james@hotmail.com>
claunia added the pull-request label 2026-01-31 09:35:04 +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#29461