shell32: Handle string-to-guid conversion errors (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Mon Jul 6 01:09:06 CDT 2015


---
-------------- next part --------------
From a631a77f5eaa3b88fcdb9ed189ae5af644dda42f Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat, 4 Jul 2015 22:43:34 +0300
Subject: [PATCH 2/6] shell32: Handle string-to-guid conversion errors

---
 dlls/shell32/shellpath.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 42f34a2..1a4528f 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -5334,7 +5334,11 @@ static HRESULT WINAPI knownfolder_GetFolderDefinition(
     hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, knownfolder->registryPath, szParentFolder,
                 RRF_RT_REG_SZ, NULL, parentGuid, &dwSize));
     if(SUCCEEDED(hr))
-        IIDFromString(parentGuid, &pKFD->fidParent);
+    {
+        hr = IIDFromString(parentGuid, &pKFD->fidParent);
+        if(FAILED(hr))
+            return hr;
+    }
 
     get_known_folder_dword(knownfolder->registryPath, szAttributes, &pKFD->dwAttributes);
 
-- 
2.1.4



More information about the wine-patches mailing list