[PR #13271] [MERGED] Fix uninitialized memory bug in GdiEngine #29456

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13271
Author: @lhecker
Created: 6/11/2022
Status: Merged
Merged: 6/13/2022
Merged by: @undefined

Base: mainHead: dev/lhecker/13270-gdi-invalidation


📝 Commits (1)

  • 69909b2 Fix uninitialized memory bug in GdiEngine

📊 Changes

5 files changed (+6 additions, -6 deletions)

View changed files

📝 src/interactivity/win32/WindowIme.cpp (+1 -1)
📝 src/interactivity/win32/window.cpp (+1 -1)
📝 src/renderer/dx/DxRenderer.cpp (+2 -2)
📝 src/renderer/gdi/paint.cpp (+1 -1)
📝 src/renderer/gdi/state.cpp (+1 -1)

📄 Description

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


🔄 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/13271 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 6/11/2022 **Status:** ✅ Merged **Merged:** 6/13/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/13270-gdi-invalidation` --- ### 📝 Commits (1) - [`69909b2`](https://github.com/microsoft/terminal/commit/69909b2cdfefbc1d01cbbc0c65fab81a42650574) Fix uninitialized memory bug in GdiEngine ### 📊 Changes **5 files changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/interactivity/win32/WindowIme.cpp` (+1 -1) 📝 `src/interactivity/win32/window.cpp` (+1 -1) 📝 `src/renderer/dx/DxRenderer.cpp` (+2 -2) 📝 `src/renderer/gdi/paint.cpp` (+1 -1) 📝 `src/renderer/gdi/state.cpp` (+1 -1) </details> ### 📄 Description 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> --- <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:35:02 +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#29456