Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
53b9a53c
Commit
53b9a53c
authored
Mar 21, 2008
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Mar 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Fix crash by long preedit text.
parent
ee08320d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
xim.c
dlls/winex11.drv/xim.c
+16
-8
No files found.
dlls/winex11.drv/xim.c
View file @
53b9a53c
...
...
@@ -293,9 +293,6 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d
static
void
XIMPreEditDrawCallback
(
XIM
ic
,
XPointer
client_data
,
XIMPreeditDrawCallbackStruct
*
P_DR
)
{
DWORD
dwOutput
;
WCHAR
wcOutput
[
64
];
TRACE
(
"PreEditDrawCallback %p
\n
"
,
ic
);
if
(
P_DR
)
...
...
@@ -306,14 +303,25 @@ static void XIMPreEditDrawCallback(XIM ic, XPointer client_data,
{
if
(
!
P_DR
->
text
->
encoding_is_wchar
)
{
DWORD
dwOutput
;
WCHAR
*
wcOutput
;
TRACE
(
"multibyte
\n
"
);
dwOutput
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
P_DR
->
text
->
string
.
multi_byte
,
-
1
,
wcOutput
,
64
);
/* ignore null */
dwOutput
--
;
X11DRV_ImmSetInternalString
(
GCS_COMPSTR
,
sel
,
len
,
wcOutput
,
dwOutput
);
NULL
,
0
);
wcOutput
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
dwOutput
);
if
(
wcOutput
)
{
dwOutput
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
P_DR
->
text
->
string
.
multi_byte
,
-
1
,
wcOutput
,
dwOutput
);
/* ignore null */
dwOutput
--
;
X11DRV_ImmSetInternalString
(
GCS_COMPSTR
,
sel
,
len
,
wcOutput
,
dwOutput
);
HeapFree
(
GetProcessHeap
(),
0
,
wcOutput
);
}
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment