[PR #12699] [MERGED] Fix uninitialized memory access in GetConsoleTitleA test #29190

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12699
Author: @lhecker
Created: 3/15/2022
Status: Merged
Merged: 3/17/2022
Merged by: @undefined

Base: mainHead: dev/lhecker/fix-GetConsoleTitleA


📝 Commits (1)

  • bdf27c2 Fix uninitialized memory in GetConsoleTitleA test

📊 Changes

1 file changed (+4 additions, -24 deletions)

View changed files

📝 src/host/ut_host/ApiRoutinesTests.cpp (+4 -24)

📄 Description

WideCharToMultiByte doesn't write a final null-byte by default.
til::u16u8 avoids the problem.

PR Checklist

  • I work here
  • Tests added/passed

Validation Steps Performed

  • Test passes in Debug builds

🔄 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/12699 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 3/15/2022 **Status:** ✅ Merged **Merged:** 3/17/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/fix-GetConsoleTitleA` --- ### 📝 Commits (1) - [`bdf27c2`](https://github.com/microsoft/terminal/commit/bdf27c244cda9e94b6027c0afea20f1d98f4e636) Fix uninitialized memory in GetConsoleTitleA test ### 📊 Changes **1 file changed** (+4 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `src/host/ut_host/ApiRoutinesTests.cpp` (+4 -24) </details> ### 📄 Description `WideCharToMultiByte` doesn't write a final null-byte by default. `til::u16u8` avoids the problem. ## PR Checklist * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Test passes in Debug builds ✅ --- <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:33:24 +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#29190