Bug 470804 crash [@ NS_GetInnermostURI - nsScriptSecurityManager::CheckLoadURIWithPrincipal], r=bz, sr=dveditz, a191=bsmedberg
authortimeless@mozdev.org
Thu, 01 Jan 2009 15:45:23 -0800
changeset 24286 79b969c3d4fa875450b55a2d85e92d7db5f9915c
parent 24285 76822b1b7bf26f47864fad295c4c4bb9aed21998
child 24287 3b6c1a8033a4f7510ad77cb8ffa7554af95c2cda
push id1124
push userbugzilla@standard8.plus.com
push dateThu, 09 Apr 2009 08:03:32 +0000
reviewersbz, dveditz
bugs470804
milestone1.9.1b4pre
Bug 470804 crash [@ NS_GetInnermostURI - nsScriptSecurityManager::CheckLoadURIWithPrincipal], r=bz, sr=dveditz, a191=bsmedberg
caps/src/nsScriptSecurityManager.cpp
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -1279,16 +1279,17 @@ nsScriptSecurityManager::CheckLoadURIWit
     // fail, because they may need a security check that we don't
     // provide.
     NS_ENSURE_FALSE(aFlags & ~(nsIScriptSecurityManager::LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT |
                                nsIScriptSecurityManager::ALLOW_CHROME |
                                nsIScriptSecurityManager::DISALLOW_SCRIPT |
                                nsIScriptSecurityManager::DISALLOW_INHERIT_PRINCIPAL),
                     NS_ERROR_UNEXPECTED);
     NS_ENSURE_ARG_POINTER(aPrincipal);
+    NS_ENSURE_ARG_POINTER(aTargetURI);
 
     if (aPrincipal == mSystemPrincipal) {
         // Allow access
         return NS_OK;
     }
     
     nsCOMPtr<nsIURI> sourceURI;
     aPrincipal->GetURI(getter_AddRefs(sourceURI));