mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 19:54:06 +00:00
Make CLSIDFromString return a CLSID of zeros instead of crashing when
passed a null pointer.
This commit is contained in:
parent
e5bd2f8221
commit
923685ac95
|
@ -452,7 +452,10 @@ HRESULT WINAPI CLSIDFromString16(
|
|||
int i;
|
||||
BYTE table[256];
|
||||
|
||||
TRACE("%s -> %p\n", idstr, id);
|
||||
if (!s)
|
||||
s = "{00000000-0000-0000-0000-000000000000}";
|
||||
|
||||
TRACE("%s -> %p\n", s, id);
|
||||
|
||||
/* quick lookup table */
|
||||
memset(table, 0, 256);
|
||||
|
@ -467,7 +470,7 @@ HRESULT WINAPI CLSIDFromString16(
|
|||
|
||||
/* in form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} */
|
||||
|
||||
if (strlen(idstr) != 38)
|
||||
if (strlen(s) != 38)
|
||||
return OLE_ERROR_OBJECT;
|
||||
|
||||
p = (BYTE *) id;
|
||||
|
|
Loading…
Reference in a new issue