mshtml: Set outgoing pass-by-address variable in an error case case within confirm_safety_load.

Gerald Pfeifer gerald at pfeifer.com
Wed Mar 7 16:35:31 CST 2012


I noticed we return in this case, without initializing this variable.
Visual inspection indicates we do not seem to access the variable in
this error case, but a) better safe than sorry, and b) GCC 4.8 currently
warns about it.

Not sure URLPOLICY_DISALLOW is the best return value, open for better
alternatives.

Gerald

---
 dlls/mshtml/secmgr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/secmgr.c b/dlls/mshtml/secmgr.c
index ff349ac..a653fe2 100644
--- a/dlls/mshtml/secmgr.c
+++ b/dlls/mshtml/secmgr.c
@@ -104,8 +104,10 @@ static HRESULT confirm_safety_load(HTMLDocumentNode *This, struct CONFIRMSAFETY
         CATID init_catid = CATID_SafeForInitializing;
 
         hres = ICatInformation_IsClassOfCategories(This->catmgr, &cs->clsid, 1, &init_catid, 0, NULL);
-        if(FAILED(hres))
+        if(FAILED(hres)) {
+            *ret = URLPOLICY_DISALLOW;
             return hres;
+        }
 
         *ret = hres == S_OK ? URLPOLICY_ALLOW : URLPOLICY_DISALLOW;
     }
-- 
1.7.7.3



More information about the wine-patches mailing list