From: Maotong Zhang zmtong1988@gmail.com
guid_from_string() now clears the GUID if open_classes_key() fails. --- dlls/combase/combase.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index b3a1c9bd8fc..89cbd720f9c 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -1330,11 +1330,17 @@ static const BYTE guid_conv_table[256] = static BOOL guid_from_string(LPCWSTR s, GUID *id) { int i; + HKEY xhkey = NULL;
if (!s || s[0] != '{') { - memset(id, 0, sizeof(*id)); - if (!s) return TRUE; + if (!s) + { + memset(id, 0, sizeof(*id)); + return TRUE; + } + if (open_classes_key(HKEY_CLASSES_ROOT, s, KEY_READ, &xhkey) != ERROR_SUCCESS) + memset(id, 0, sizeof(*id)); return FALSE; }