-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Description of the Issue
When Notepad++ is active and its Clipboard History panel is shown, after copying and pasting in both Notepad++ and other applications (such as other text editors, file managers, browsers) during some noticeable time (let's say, 2 hours) one may notice unexpected hieroglyph-like symbols (that were not part of any copy-pasted text).
This behavior is reproduced with and without plugins.
Please look at the screenshot (I did not alter the screenshot - it shows exactly how the Clipboard History panel looks like).

Steps to Reproduce the Issue
- Start Notepad++
- Show the Clipboard History panel and keep it visible
- Copy and paste different text inside and outside Notepad++ during a few hours (if you are a developer, it actually means just to keep Notepad++ open with its Clipboard History panel visible during a few working hours).
- Observe how the lines in the Clipboard History panel look like
- I noticed that when I copy-paste from and to FAR Manager, especially when copying multi-line text (in FAR Manager it is e.g. Ctrl+Insert and Ctrl+Alt+Insert when there are selected files in the file panels), the chances to get corrupted text in the Clipboard History are higher.
Expected Behavior
All the copy-pasted strings shoud look as is, without any unexpected symbols.
Actual Behavior
Unexpected hieroglyph-like symbols appear (see the screenshot). Also, some other strings look truncated (some trailing characters are missed).
I believe it may be caused by out-of-buffer reading, when e.g. some data in the Clipboard is expected to be a null-terminated string while it is actually not (I mean, it does not contain the trailing \0); or, maybe, some code in Notepad++ uses structures where the trailing \0 is expected but not provided.
Debug Information
Notepad++ v8.5.4 (32-bit)
Build time : Jun 17 2023 - 20:40:14
Path : C:\Progs\Notepadpp\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 22H2
OS Build : 19045.3086
Current ANSI codepage : 1251
Plugins :