Commit f44c1f7e authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Transfer only cbStruct size in BindCtxImpl_S(G)etOptions.

parent dd03cc19
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment