From 70ebae341d35f4de2928a0b432759dc347ac52a0 Mon Sep 17 00:00:00 2001 From: Jeff Latimer Date: Tue, 5 Aug 2008 22:16:01 +1000 Subject: [PATCH] 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 69b18d51c1..738d511bb1 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 082a8bf70c..92ce3a9f0b 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);