Bug 104103 - [r=rrelyea a=dolske]
authorKai Engert <kaie@kuix.de>
Fri, 19 Nov 2010 01:22:40 -0800
changeset 57892 ab4cdb935ccff5059085337664d18f3593e5b570
parent 57891 6957f4aa855f8906c4534964febbe7d28908cfd8
child 57893 6478c1b83d60598c5015ca74dc170340aa867b0b
push id17066
push userreed@reedloden.com
push dateFri, 19 Nov 2010 09:22:50 +0000
treeherdermozilla-central@ab4cdb935ccf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrrelyea, dolske
bugs104103
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 104103 - [r=rrelyea a=dolske]
security/manager/ssl/src/nsCrypto.cpp
--- a/security/manager/ssl/src/nsCrypto.cpp
+++ b/security/manager/ssl/src/nsCrypto.cpp
@@ -691,16 +691,20 @@ cryptojs_generateOneKeyPair(JSContext *c
   nsKeygenThread *KeygenRunnable = 0;
   nsCOMPtr<nsIKeygenThread> runnable;
 
   PRUint32 mechanism = cryptojs_convert_to_mechanism(keyPairInfo->keyGenType);
   void *keyGenParams = nsConvertToActualKeyGenParams(mechanism, params, 
                                                      (params) ? strlen(params):0, 
                                                      keySize, keyPairInfo);
 
+  if (!keyGenParams) {
+    return NS_ERROR_INVALID_ARG;
+  }
+
   // Make sure the token has password already set on it before trying
   // to generate the key.
 
   nsresult rv = setPassword(slot, uiCxt);
   if (NS_FAILED(rv))
     return rv;
 
   if (PK11_Authenticate(slot, PR_TRUE, uiCxt) != SECSuccess)