[Bug 53939] New: TextOut will output ASCII control character(0~31) as tofu cause crash
https://bugs.winehq.org/show_bug.cgi?id=53939 Bug ID: 53939 Summary: TextOut will output ASCII control character(0~31) as tofu cause crash Product: Wine Version: 7.12 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: gdi32 Assignee: wine-bugs(a)winehq.org Reporter: 399989567(a)qq.com Distribution: --- TextOut will output ASCII control character(0~31) as tofu cause crash build a string on windows
static WCHAR str[] = {0x1c,0x30,0x31,0x32,0}
use TextOut(hdc,x,y,str,wcslen(str)) to output this str on windows: output is "012" on wine : output is "?012" The reason is that this API does not filter ASCII control characters, and treats the control characters as an ordinary character to output. by the way if we fillter the control character we alse need fix the API :GetTextExtentExPointW Because my program uses control characters, there will be problems when calculating the length, resulting in a crash. If I filter out the control characters in the code myself, it will not crash. And in principle, the focus should be on whether control characters should be output -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal CC| |dark.shadow4(a)web.de --- Comment #1 from Fabian Maurer <dark.shadow4(a)web.de> --- Not a blocker. Can we have another sample program here? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 --- Comment #2 from 399989567(a)qq.com --- (In reply to Fabian Maurer from comment #1)
Not a blocker.
Can we have another sample program here?
of course -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 --- Comment #3 from 399989567(a)qq.com --- Created attachment 73507 --> https://bugs.winehq.org/attachment.cgi?id=73507 demo on windows10 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 --- Comment #4 from 399989567(a)qq.com --- Created attachment 73508 --> https://bugs.winehq.org/attachment.cgi?id=73508 Figure1 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 --- Comment #5 from 399989567(a)qq.com --- (In reply to Fabian Maurer from comment #1)
Not a blocker.
Can we have another sample program here?
The width of the orange is 25, the width of "启" is 20, -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 --- Comment #6 from Fabian Maurer <dark.shadow4(a)web.de> --- Alright, although I don't get a crash on Wine. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 --- Comment #7 from 399989567(a)qq.com --- (In reply to Fabian Maurer from comment #6)
Alright, although I don't get a crash on Wine.
This demo won't crash, it's because I have an own application that contains a lot of ASCII control characters in the output string, so it will generate extra values in rendering and length calculation, resulting in a crash, but in essence Unexpected output of ASCII control symbols is indeed a problem. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=53939 Petrichor Park <ppark(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppark(a)codeweavers.com --- Comment #8 from Petrichor Park <ppark(a)codeweavers.com> --- Hello, Would you mind attaching the source code of your test program? -- 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.
participants (1)
-
WineHQ Bugzilla