user32: Resend Check for NULL pData in DdeClientTransaction expecting to be passed a handle

Alexandre Julliard julliard at winehq.org
Fri Sep 5 09:05:58 CDT 2008


Jeff Latimer <lats at yless4u.com.au> writes:

> @@ -1157,7 +1157,10 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
>          /* Windows simply ignores hszItem and wFmt in this case */
>  	if (pData == NULL)
>  	{
> -	    pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
> +	    if (cbData == -1)
> +	        pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
> +	    else
> +	        pConv->instance->lastError = DMLERR_MEMORY_ERROR;
>  	    return 0;
>  	}
>  	pXAct = WDML_ClientQueueExecute(pConv, pData, cbData);

It would be cleaner to do the checks inside WDML_ClientQueueExecute
since it already handles the cbData==-1 case differently.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list