dlls/msxml3: Using strlenW instead of SysStringLen to check node name length

Nikolay Sivov bunglehead at gmail.com
Tue Mar 23 08:59:57 CDT 2010


On 3/23/2010 16:48, Eric Lanz wrote:
> Sure thing,
>
> The line we call is:
>
> m_pMD5XMLDoc->createNode(varType, L"md5report", L"",&pMD5RootNode);
>    
So it's not a BSTR.
> So I think we are sending the createNode function WCHAR strings like Nikolay is saying.
>
> For that call the SysStringLen function is giving a length of 0 for L"md5report".
>    
You are lucky that it doesn't crash.
> I think that Nikolay's code in LoadXML() handles our use-case properly, my only concern is that the code that is giving me a problem is meant to be an early-exit and I'm thinking that if we add so much checking code to it then it defeats the purpose of the early exit.
>    
No sure what you mean here. This one is more complex:
>         if (!name || SysStringLen(name) == 0) return E_FAIL;
comparing with what you need:
>         if (!name || !*name) return E_FAIL;
or simplifying:
>         if (!(name && *name)) return E_FAIL;
> Eric
>    




More information about the wine-devel mailing list