Integrated: 8281384: Random chars on paste from Windows clipboard

Oliver Schmidtmer oschmidtmer at openjdk.org
Tue Apr 1 11:22:50 UTC 2025


On Tue, 25 Feb 2025 13:25:07 GMT, Oliver Schmidtmer <oschmidtmer at openjdk.org> wrote:

> Windows programs may reuse a clipboard buffer that is larger than the new content. In this case de NUL terminator is not at the end of the buffer, but within it. 
> The current implementation copys the whole buffer into a text field, including the NUL terminator and the remaining chars.
> 
> The JIRA ticket contains a JNA based sample program, which prefills the buffer for demonstrating this issue.
> If this should be added as a unit test, I'm open for advice how to do that.

This pull request has now been integrated.

Changeset: 5c78234b
Author:    Oliver Schmidtmer <oschmidtmer at openjdk.org>
Committer: Kevin Rushforth <kcr at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/5c78234b43d1fffa1fea0d1406599ed46af8c863
Stats:     10 lines in 2 files changed: 8 ins; 1 del; 1 mod

8281384: Random chars on paste from Windows clipboard

Reviewed-by: kcr, lkostyra

-------------

PR: https://git.openjdk.org/jfx/pull/1724


More information about the openjfx-dev mailing list