Re: [PATCH] advapi32: add more checks in CRYPT_CreateMachineGuid.

2008-04-24 Thread Lei Zhang
On Thu, Apr 24, 2008 at 10:42 PM, Dmitry Timoshkov
<[EMAIL PROTECTED]> wrote:
> "Lei Zhang" <[EMAIL PROTECTED]> wrote:
>
>
> > I'm getting a crash in CRYPT_CreateMachineGuid() with native
> > rpcrt4.dll. This adds some checks to work around it.
> >
>
>  I assume that "native" == "win9x" in this case.
>
>
> > pRpcStringFree = GetProcAddress(lib, "RpcStringFreeW");
> > +if (!pUuidCreate || !pUuidToString || !pRpcStringFree) goto
> CreateMachineGuidCleaup;
> >
>
>  It would be better to use A versions of APIs then instead of failing,
>
>  --
>  Dmitry.
>

Right, native == win9x here. The GetProcAddress call actually
succeeds, but then pUuidToString returns RPC_S_CANNOT_SUPPORT.

I'll send a better patch out tomorrow.




Re: [PATCH] advapi32: add more checks in CRYPT_CreateMachineGuid.

2008-04-24 Thread Dmitry Timoshkov
"Lei Zhang" <[EMAIL PROTECTED]> wrote:

> I'm getting a crash in CRYPT_CreateMachineGuid() with native
> rpcrt4.dll. This adds some checks to work around it.

I assume that "native" == "win9x" in this case.

>  pRpcStringFree = GetProcAddress(lib, "RpcStringFreeW");
> +if (!pUuidCreate || !pUuidToString || !pRpcStringFree) goto 
> CreateMachineGuidCleaup;

It would be better to use A versions of APIs then instead of failing,

-- 
Dmitry.