user32: DdeClientTransaction should check that pData is not NULL for XTYP_REQUEST.

This commit is contained in:
Jeff Latimer 2008-08-05 22:16:01 +10:00 committed by Alexandre Julliard
parent 04a59014f8
commit 70ebae341d
2 changed files with 6 additions and 4 deletions

View File

@ -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:

View File

@ -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);