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
2e31a44a
Commit
2e31a44a
authored
Oct 30, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/test: Don't over-allocate memory for DDEDATA.
parent
1aa62364
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
dde.c
dlls/user32/tests/dde.c
+5
-9
No files found.
dlls/user32/tests/dde.c
View file @
2e31a44a
...
@@ -143,7 +143,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA
...
@@ -143,7 +143,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA
else
else
lstrcpyA
(
str
,
"requested data
\r\n
"
);
lstrcpyA
(
str
,
"requested data
\r\n
"
);
size
=
sizeof
(
DDEDATA
)
+
lstrlenA
(
str
)
+
1
;
size
=
FIELD_OFFSET
(
DDEDATA
,
Value
[
lstrlenA
(
str
)
+
1
])
;
hglobal
=
GlobalAlloc
(
GMEM_MOVEABLE
,
size
);
hglobal
=
GlobalAlloc
(
GMEM_MOVEABLE
,
size
);
ok
(
hglobal
!=
NULL
,
"Expected non-NULL hglobal
\n
"
);
ok
(
hglobal
!=
NULL
,
"Expected non-NULL hglobal
\n
"
);
...
@@ -314,8 +314,7 @@ static void test_ddeml_client(void)
...
@@ -314,8 +314,7 @@ static void test_ddeml_client(void)
{
{
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
ok
(
!
lstrcmpA
(
str
,
"requested data
\r\n
"
),
"Expected 'requested data
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
!
lstrcmpA
(
str
,
"requested data
\r\n
"
),
"Expected 'requested data
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
size
==
19
||
broken
(
size
==
28
),
/* sizes are rounded up on win9x */
ok
(
size
==
17
,
"Expected 17, got %d
\n
"
,
size
);
"Expected 19, got %d
\n
"
,
size
);
ret
=
DdeUnaccessData
(
hdata
);
ret
=
DdeUnaccessData
(
hdata
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
@@ -336,8 +335,7 @@ todo_wine
...
@@ -336,8 +335,7 @@ todo_wine
{
{
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
ok
(
!
lstrcmpA
(
str
,
"requested data
\r\n
"
),
"Expected 'requested data
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
!
lstrcmpA
(
str
,
"requested data
\r\n
"
),
"Expected 'requested data
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
size
==
19
||
broken
(
size
==
28
),
/* sizes are rounded up on win9x */
ok
(
size
==
17
,
"Expected 17, got %d
\n
"
,
size
);
"Expected 19, got %d
\n
"
,
size
);
ret
=
DdeUnaccessData
(
hdata
);
ret
=
DdeUnaccessData
(
hdata
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
@@ -357,8 +355,7 @@ todo_wine
...
@@ -357,8 +355,7 @@ todo_wine
{
{
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
ok
(
!
lstrcmpA
(
str
,
"requested data
\r\n
"
),
"Expected 'requested data
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
!
lstrcmpA
(
str
,
"requested data
\r\n
"
),
"Expected 'requested data
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
size
==
19
||
broken
(
size
==
28
),
/* sizes are rounded up on win9x */
ok
(
size
==
17
,
"Expected 17, got %d
\n
"
,
size
);
"Expected 19, got %d
\n
"
,
size
);
ret
=
DdeUnaccessData
(
hdata
);
ret
=
DdeUnaccessData
(
hdata
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
@@ -483,8 +480,7 @@ todo_wine
...
@@ -483,8 +480,7 @@ todo_wine
{
{
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
str
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
ok
(
!
lstrcmpA
(
str
,
"command executed
\r\n
"
),
"Expected 'command executed
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
!
lstrcmpA
(
str
,
"command executed
\r\n
"
),
"Expected 'command executed
\\
r
\\
n', got %s
\n
"
,
str
);
ok
(
size
==
21
||
broken
(
size
==
28
),
/* sizes are rounded up on win9x */
ok
(
size
==
19
,
"Expected 19, got %d
\n
"
,
size
);
"Expected 21, got %d
\n
"
,
size
);
ret
=
DdeUnaccessData
(
hdata
);
ret
=
DdeUnaccessData
(
hdata
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
...
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