Jeff Latimer : user32: DdeClientTransaction should check that pData is not NULL for XTYP_REQUEST.
Alexandre Julliard
julliard at winehq.org
Mon Aug 18 10:47:14 CDT 2008
Module: wine
Branch: master
Commit: 70ebae341d35f4de2928a0b432759dc347ac52a0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=70ebae341d35f4de2928a0b432759dc347ac52a0
Author: Jeff Latimer <lats at yless4u.com.au>
Date: Tue Aug 5 22:16:01 2008 +1000
user32: DdeClientTransaction should check that pData is not NULL for XTYP_REQUEST.
---
dlls/user32/dde_client.c | 5 +++++
dlls/user32/tests/dde.c | 5 +----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c
index 69b18d5..738d511 100644
--- a/dlls/user32/dde_client.c
+++ b/dlls/user32/dde_client.c
@@ -1154,6 +1154,11 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
{
case XTYP_EXECUTE:
/* Windows simply ignores hszItem and wFmt in this case */
+ if (pData == NULL)
+ {
+ pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
+ return 0;
+ }
pXAct = WDML_ClientQueueExecute(pConv, pData, cbData);
break;
case XTYP_POKE:
diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index 082a8bf..92ce3a9 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -433,10 +433,7 @@ todo_wine
ret = DdeGetLastError(client_pid);
ok(op == NULL, "Expected NULL, got %p\n", op);
ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res);
- todo_wine
- {
- ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
- }
+ ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
DdeFreeStringHandle(client_pid, topic);
DdeFreeDataHandle(hdata);
More information about the wine-cvs
mailing list