http://bugs.winehq.org/show_bug.cgi?id=59257 Bug ID: 59257 Summary: RTF clipboard reads randomly chosen string (regression from wine 10) Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@list.winehq.org Reporter: ssb22@cam.ac.uk Distribution: --- After placing text on the X11 clipboard from Emacs 29.3 in Ubuntu 24.04 LTS and attempting to paste this into a Windows program that is set to read RTF clipboard when available, the Windows program alternately comes out with "emacs" or my full name or some other string, none of which are what I put on the clipboard. The code below minimally demonstrates the issue. Use `i686-w64-mingw32-gcc test.c` and `wine a.exe` after placing some text onto the clipboard from Emacs. This works correctly in WINE 10 but fails in WINE 11, potentially feeding randomly-chosen private strings to the Windows program instead (I was unable to figure out how it got my full name when this was not on the clipboard, but it's clearly somehow reading from some part of memory it shouldn't). ```c #include <windows.h> #include <stdio.h> int main() { UINT cfRtf = RegisterClipboardFormat(TEXT("Rich Text Format")); if (!OpenClipboard(NULL)) { printf("Failed to open clipboard\n"); return 1; } if (IsClipboardFormatAvailable(cfRtf)) { HANDLE hData = GetClipboardData(cfRtf); if (hData) { char* data = (char*)GlobalLock(hData); if (data) { printf("RTF clipboard contains: '%s'\n", data); GlobalUnlock(hData); } } else { printf("GetClipboardData failed\n"); } } else { printf("RTF format not available\n"); } CloseClipboard(); return 0; } ``` -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.