Bug 578219 Crash in [@ nsNativeModuleLoader::LoadModule ] when installing LastPass Password Manager addon
authortimeless@mozdev.org
Thu, 15 Jul 2010 15:55:05 +0300
changeset 47695 386f6ab3c09b6cb265d156e8f541b1258104b9d8
parent 47694 650265c94f37dadd3d7947001f03c3759d5d9f7c
child 47696 033869c77319c947ff5631b75f3b0247ce9d4e03
push idunknown
push userunknown
push dateunknown
bugs578219
milestone2.0b2pre
Bug 578219 Crash in [@ nsNativeModuleLoader::LoadModule ] when installing LastPass Password Manager addon r=bsmedberg
xpcom/components/nsNativeComponentLoader.cpp
--- a/xpcom/components/nsNativeComponentLoader.cpp
+++ b/xpcom/components/nsNativeComponentLoader.cpp
@@ -196,18 +196,19 @@ nsNativeModuleLoader::LoadModule(nsILoca
                 NS_BREAK();
             }
         }
 
         free(blist);
     }
 #endif
 
-    data.module = *(mozilla::Module const *const *) PR_FindSymbol(data.library, "NSModule");
-    if (data.module) {
+    void *module = PR_FindSymbol(data.library, "NSModule");
+    if (module) {
+        data.module = *(mozilla::Module const *const *) module;
         if (mLibraries.Put(hashedFile, data))
             return data.module;
     }
     else {
         LOG(PR_LOG_ERROR,
             ("nsNativeModuleLoader::LoadModule(\"%s\") - "
              "Symbol NSModule not found", filePath.get()));
     }