On Fri, Feb 15, 2019 at 3:42 AM Dmitry Timoshkov <
dmitry@baikal.ru> wrote:
>
> Jactry Zeng <
jzeng@codeweavers.com> wrote:
>
> > +HRESULT WINAPI PropVariantToBuffer(REFPROPVARIANT propvarIn, void *ret, UINT cb)
> > +{
> > + TRACE("(%p, %p, %d)\n", propvarIn, ret, cb);
> > +
> > + if(cb > propvarIn->u.caub.cElems)
> > + return E_FAIL;
> > +
> > + memcpy(ret, propvarIn->u.caub.pElems, cb);
> > +
> > + return S_OK;
> > +}
>
> What happens when NULL and/or 0 are passed in?
I sent another try and added a test for this case in it.