user32: Resend Check for NULL pData in DdeClientTransAction expectingto be passed a handle
Dmitry Timoshkov
dmitry at codeweavers.com
Sat Sep 6 04:20:59 CDT 2008
"Jeff Latimer" <lats at yless4u.com.au> wrote:
> diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c
> index 99e2d1c..cbbf99a 100644
> --- a/dlls/user32/dde_client.c
> +++ b/dlls/user32/dde_client.c
> @@ -632,6 +632,15 @@ static WDML_XACT* WDML_ClientQueueExecute(WDML_CONV* pConv, LPVOID pData, DWORD
>
> TRACE("XTYP_EXECUTE transaction\n");
>
> + if (pData == NULL)
> + {
> + if (cbData == (DWORD)-1)
> + pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
> + else
> + pConv->instance->lastError = DMLERR_MEMORY_ERROR;
> + return NULL;
> + }
Alexandre suggested to use the existing 'if (cbData == (DWORD)-1)' block,
not introduce a new one.
> @@ -1154,13 +1163,10 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
> switch (wType)
> {
> case XTYP_EXECUTE:
> - /* Windows simply ignores hszItem and wFmt in this case */
> - if (pData == NULL)
> - {
> - pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
> - return 0;
> - }
> + /* Windows simply ignores hszItem and wFmt in this case */
> pXAct = WDML_ClientQueueExecute(pConv, pData, cbData);
> + if (pXAct == NULL)
> + return 0;
> break;
The formatting of the above block is strange. Set the tab size in your
editor to 8 and you will see the mess.
--
Dmitry.
More information about the wine-devel
mailing list