[PR #3255] [MERGED] html copy: fix null character in font face name #25292

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3255
Author: @mcpiroman
Created: 10/19/2019
Status: Merged
Merged: 10/21/2019
Merged by: @DHowett-MSFT

Base: masterHead: fix-null-in-font-name


📝 Commits (1)

  • 61fd8f5 Fix null character in font face name

📊 Changes

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

View changed files

📝 src/renderer/dx/DxRenderer.cpp (+6 -11)

📄 Description

Summary of the Pull Request

Fixes off-by-one bug when copying font name, which resulted in null character being inside the string. The code assumed that std::string::resize() includes null, but it does not.

References

It resulted in HTML string including null character (from font name) which was no good (#3252).

PR Checklist

  • Closes Copy and paste in bash generates one single line (#3252)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

🔄 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/3255 **Author:** [@mcpiroman](https://github.com/mcpiroman) **Created:** 10/19/2019 **Status:** ✅ Merged **Merged:** 10/21/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `fix-null-in-font-name` --- ### 📝 Commits (1) - [`61fd8f5`](https://github.com/microsoft/terminal/commit/61fd8f57b6659390b71ba76598751a73a640c17f) Fix null character in font face name ### 📊 Changes **1 file changed** (+6 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/DxRenderer.cpp` (+6 -11) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Fixes off-by-one bug when copying font name, which resulted in null character being inside the string. The code assumed that `std::string::resize()` includes null, but it does not. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References It resulted in HTML string including null character (from font name) which was no good (#3252). <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes #3252 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx --- <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:08:34 +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#25292