From 69733d65e82035a4375042e283bf9720f833ca69 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 6 Jul 2015 09:09:06 +0300 Subject: [PATCH] shell32: Handle string-to-guid conversion errors (Coverity). --- 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 42f34a2ae4b..1a4528f04da 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);