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
4f95cf70
Commit
4f95cf70
authored
Apr 24, 2008
by
Alex Villacís Lasso
Committed by
Alexandre Julliard
Apr 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Reject RTF that is recognized as invalid.
parent
d10256f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
15 deletions
+3
-15
editor.c
dlls/riched20/editor.c
+3
-3
editor.c
dlls/riched20/tests/editor.c
+0
-8
editor.c
dlls/riched32/tests/editor.c
+0
-4
No files found.
dlls/riched20/editor.c
View file @
4f95cf70
...
...
@@ -1029,6 +1029,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
int
from
,
to
,
to2
,
nUndoMode
;
int
nEventMask
=
editor
->
nEventMask
;
ME_InStream
inStream
;
BOOL
invalidRTF
=
FALSE
;
TRACE
(
"stream==%p hWnd==%p format==0x%X
\n
"
,
stream
,
editor
->
hWnd
,
format
);
editor
->
nEventMask
=
0
;
...
...
@@ -1071,13 +1072,12 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
if
((
!
editor
->
bEmulateVersion10
&&
strncmp
(
inStream
.
buffer
,
"{
\\
rtf"
,
5
)
&&
strncmp
(
inStream
.
buffer
,
"{
\\
urtf"
,
6
))
||
(
editor
->
bEmulateVersion10
&&
*
inStream
.
buffer
!=
'{'
))
{
format
&=
~
SF_RTF
;
format
|=
SF_TEXT
;
invalidRTF
=
TRUE
;
}
}
}
if
(
!
inStream
.
editstream
->
dwError
)
if
(
!
in
validRTF
&&
!
in
Stream
.
editstream
->
dwError
)
{
if
(
format
&
SF_RTF
)
{
/* setup the RTF parser */
...
...
dlls/riched20/tests/editor.c
View file @
4f95cf70
...
...
@@ -2415,28 +2415,20 @@ static void test_EM_STREAMIN(void)
(
WPARAM
)(
SF_RTF
),
(
LPARAM
)
&
es
);
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
todo_wine
{
ok
(
result
==
0
,
"EM_STREAMIN: Test 2 returned %ld, expected 0
\n
"
,
result
);
}
todo_wine
{
ok
(
strlen
(
buffer
)
==
0
,
"EM_STREAMIN: Test 2 set wrong text: Result: %s
\n
"
,
buffer
);
}
es
.
dwCookie
=
(
DWORD_PTR
)
&
streamText3
;
SendMessage
(
hwndRichEdit
,
EM_STREAMIN
,
(
WPARAM
)(
SF_RTF
),
(
LPARAM
)
&
es
);
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
todo_wine
{
ok
(
result
==
0
,
"EM_STREAMIN: Test 3 returned %ld, expected 9
\n
"
,
result
);
}
todo_wine
{
ok
(
strlen
(
buffer
)
==
0
,
"EM_STREAMIN: Test 3 set wrong text: Result: %s
\n
"
,
buffer
);
}
DestroyWindow
(
hwndRichEdit
);
}
...
...
dlls/riched32/tests/editor.c
View file @
4f95cf70
...
...
@@ -276,14 +276,10 @@ static void test_EM_STREAMIN(void)
(
WPARAM
)(
SF_RTF
),
(
LPARAM
)
&
es
);
result
=
SendMessage
(
hwndRichEdit
,
WM_GETTEXT
,
1024
,
(
LPARAM
)
buffer
);
todo_wine
{
ok
(
result
==
0
,
"EM_STREAMIN: Test 3 returned %ld, expected 0
\n
"
,
result
);
}
todo_wine
{
ok
(
strlen
(
buffer
)
==
0
,
"EM_STREAMIN: Test 3 set wrong text: Result: %s
\n
"
,
buffer
);
}
DestroyWindow
(
hwndRichEdit
);
}
...
...
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