Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
wine
wine-cw
Commits
d89c4674
Commit
d89c4674
authored
Nov 05, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Don't access memory after freeing it.
parent
01e8eaef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
editor.c
dlls/riched20/editor.c
+6
-4
No files found.
dlls/riched20/editor.c
View file @
d89c4674
...
...
@@ -1812,18 +1812,20 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
LPWSTR
wszText
=
ME_ToUnicode
(
hWnd
,
(
void
*
)
lParam
);
size_t
len
=
lstrlenW
(
wszText
);
TRACE
(
"EM_REPLACESEL - %s
\n
"
,
debugstr_w
(
wszText
));
ME_GetSelection
(
editor
,
&
from
,
&
to
);
style
=
ME_GetSelectionInsertStyle
(
editor
);
ME_InternalDeleteText
(
editor
,
from
,
to
-
from
);
ME_InsertTextFromCursor
(
editor
,
0
,
wszText
,
len
,
style
);
ME_ReleaseStyle
(
style
);
ME_EndToUnicode
(
hWnd
,
wszText
);
/* drop temporary style if line end */
/* FIXME question: does abc\n mean: put abc, clear temp style, put \n? (would require a change) */
/*
* FIXME question: does abc\n mean: put abc,
* clear temp style, put \n? (would require a change)
*/
if
(
len
>
0
&&
wszText
[
len
-
1
]
==
'\n'
)
ME_ClearTempStyle
(
editor
);
ME_EndToUnicode
(
hWnd
,
wszText
);
ME_CommitUndo
(
editor
);
if
(
!
wParam
)
ME_EmptyUndoStack
(
editor
);
...
...
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