=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: explorer: Check return of IShellFolder_GetDisplayNameOf (Coverity).

Alexandre Julliard julliard at winehq.org
Wed Jan 29 14:53:33 CST 2014


Module: wine
Branch: master
Commit: 9ab0eab9e9d8ed09f9c7ce1b7ae4b6107362ff23
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9ab0eab9e9d8ed09f9c7ce1b7ae4b6107362ff23

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun Jan 19 20:55:39 2014 +0100

explorer: Check return of IShellFolder_GetDisplayNameOf (Coverity).

---

 programs/explorer/startmenu.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/explorer/startmenu.c b/programs/explorer/startmenu.c
index 745e590..e9c651b 100644
--- a/programs/explorer/startmenu.c
+++ b/programs/explorer/startmenu.c
@@ -151,8 +151,8 @@ static struct menu_item* add_shell_item(struct menu_item* parent, LPITEMIDLIST p
     {
         STRRET strret;
 
-        IShellFolder_GetDisplayNameOf(parent->folder, pidl, SHGDN_INFOLDER, &strret);
-        StrRetToStrW(&strret, NULL, &item->displayname);
+        if (SUCCEEDED(IShellFolder_GetDisplayNameOf(parent->folder, pidl, SHGDN_INFOLDER, &strret)))
+            StrRetToStrW(&strret, NULL, &item->displayname);
 
         flags = SFGAO_FOLDER;
         IShellFolder_GetAttributesOf(parent->folder, 1, (LPCITEMIDLIST*)&pidl, &flags);




More information about the wine-cvs mailing list