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
64acbb55
Commit
64acbb55
authored
Jul 08, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Jul 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: sizeof DDEPOKE and DDEDATA is six, which is probably not what is…
user32: sizeof DDEPOKE and DDEDATA is six, which is probably not what is expected, so use offsetof instead.
parent
5d929b13
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
dde_client.c
dlls/user32/dde_client.c
+1
-1
dde_server.c
dlls/user32/dde_server.c
+1
-1
message.c
dlls/user32/message.c
+2
-2
dde.c
dlls/user32/tests/dde.c
+2
-5
No files found.
dlls/user32/dde_client.c
View file @
64acbb55
...
...
@@ -724,7 +724,7 @@ static WDML_XACT* WDML_ClientQueuePoke(WDML_CONV* pConv, LPVOID pData, DWORD cbD
GlobalUnlock
(
hglobal
);
}
pXAct
->
hMem
=
GlobalAlloc
(
GHND
|
GMEM_DDESHARE
,
sizeof
(
DDEPOKE
)
+
cbData
);
pXAct
->
hMem
=
GlobalAlloc
(
GHND
|
GMEM_DDESHARE
,
FIELD_OFFSET
(
DDEPOKE
,
Value
[
cbData
])
);
ddePoke
=
GlobalLock
(
pXAct
->
hMem
);
if
(
!
ddePoke
)
{
...
...
dlls/user32/dde_server.c
View file @
64acbb55
...
...
@@ -844,7 +844,7 @@ static WDML_QUEUE_STATE WDML_ServerHandlePoke(WDML_CONV* pConv, WDML_XACT* pXAct
if
(
!
(
pConv
->
instance
->
CBFflags
&
CBF_FAIL_POKES
))
{
hDdeData
=
DdeCreateDataHandle
(
pConv
->
instance
->
instanceID
,
pDdePoke
->
Value
,
GlobalSize
(
pXAct
->
hMem
)
-
sizeof
(
DDEPOKE
)
+
1
,
GlobalSize
(
pXAct
->
hMem
)
-
FIELD_OFFSET
(
DDEPOKE
,
Value
)
,
0
,
0
,
pDdePoke
->
cfFormat
,
0
);
if
(
hDdeData
)
{
...
...
dlls/user32/message.c
View file @
64acbb55
...
...
@@ -1456,8 +1456,8 @@ static BOOL post_dde_message( struct packed_message *data, const struct send_mes
{
size
=
GlobalSize
(
(
HGLOBAL
)
uiLo
)
;
if
((
info
->
msg
==
WM_DDE_ADVISE
&&
size
<
sizeof
(
DDEADVISE
))
||
(
info
->
msg
==
WM_DDE_DATA
&&
size
<
sizeof
(
DDEDATA
))
||
(
info
->
msg
==
WM_DDE_POKE
&&
size
<
sizeof
(
DDEPOKE
))
(
info
->
msg
==
WM_DDE_DATA
&&
size
<
FIELD_OFFSET
(
DDEDATA
,
Value
))
||
(
info
->
msg
==
WM_DDE_POKE
&&
size
<
FIELD_OFFSET
(
DDEPOKE
,
Value
))
)
return
FALSE
;
}
...
...
dlls/user32/tests/dde.c
View file @
64acbb55
...
...
@@ -699,10 +699,7 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
ptr
=
(
LPSTR
)
DdeAccessData
(
hdata
,
&
size
);
ok
(
!
lstrcmpA
(
ptr
,
"poke data
\r\n
"
),
"Expected 'poke data
\\
r
\\
n', got %s
\n
"
,
ptr
);
todo_wine
{
ok
(
size
==
14
,
"Expected 14, got %d
\n
"
,
size
);
}
ok
(
size
==
12
,
"Expected 12, got %d
\n
"
,
size
);
DdeUnaccessData
(
hdata
);
size
=
DdeQueryStringA
(
server_pid
,
hsz2
,
str
,
MAX_PATH
,
CP_WINANSI
);
...
...
@@ -981,7 +978,7 @@ static HGLOBAL create_poke()
DDEPOKE
*
poke
;
DWORD
size
;
size
=
sizeof
(
DDEPOKE
)
+
lstrlenA
(
"poke data
\r\n
"
)
+
1
;
size
=
FIELD_OFFSET
(
DDEPOKE
,
Value
[
sizeof
(
"poke data
\r\n
"
)])
;
hglobal
=
GlobalAlloc
(
GMEM_DDESHARE
,
size
);
ok
(
hglobal
!=
0
,
"Expected non-NULL hglobal
\n
"
);
...
...
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