Commit 923685ac authored by Owen Wang's avatar Owen Wang Committed by Alexandre Julliard

Make CLSIDFromString return a CLSID of zeros instead of crashing when

passed a null pointer.
parent e5bd2f82
......@@ -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;
......
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