Transfer only cbStruct size in BindCtxImpl_S(G)etOptions.
This commit is contained in:
parent
dd03cc19fd
commit
f44c1f7e13
|
@ -302,8 +302,12 @@ HRESULT WINAPI BindCtxImpl_SetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts
|
|||
if (pbindopts==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
This->bindOption2=*pbindopts;
|
||||
|
||||
if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
|
||||
{
|
||||
WARN("invalid size");
|
||||
return E_INVALIDARG; /* FIXME : not verified */
|
||||
}
|
||||
memcpy(&This->bindOption2, pbindopts, pbindopts->cbStruct);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -319,8 +323,12 @@ HRESULT WINAPI BindCtxImpl_GetBindOptions(IBindCtx* iface,LPBIND_OPTS2 pbindopts
|
|||
if (pbindopts==NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*pbindopts=This->bindOption2;
|
||||
|
||||
if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
|
||||
{
|
||||
WARN("invalid size");
|
||||
return E_INVALIDARG; /* FIXME : not verified */
|
||||
}
|
||||
memcpy(pbindopts, &This->bindOption2, pbindopts->cbStruct);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue