[Backport to release/10.0]: Clipboard.GetText(TextDataFormat.Rtf) does not retrieve RTF that lacks a null terminating character#14527
Open
SimonZhao888 wants to merge 1 commit into
Conversation
… not retrieve RTF that lacks a null terminating character
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/10.0 #14527 +/- ##
======================================================
+ Coverage 77.10887% 77.10915% +0.00028%
======================================================
Files 3273 3273
Lines 645062 645083 +21
Branches 47704 47708 +4
======================================================
+ Hits 497400 497418 +18
- Misses 143986 143989 +3
Partials 3676 3676
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Member
|
@SimonZhao888 For backport PRs, screenshots are not required, however, the "Test methodology," "Regression," and associated issues sections must be filled out in detail. Please refer to the PR #14121. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #14461 to release/10.0
Fixes #14458
In ReadStringFromHGLOBAL method requires a null terminator to determine string length. The format dispatch switch groups RTF (a registered format) with CF_TEXT and CF_OEMTEXT (standard formats), routing RTF through this null-termination-required path.Composition.NativeToManagedAdapterReadStringFromHGLOBAL()
When external applications (PowerPoint, etc.) place RTF on the clipboard without a null terminator — which is valid per the Windows clipboard spec — the method returns instead of the actual RTF content.string.Empty
Proposed changes
Customer Impact
Regression?
Risk
Test methodology
Microsoft Reviewers: Open in CodeFlow