From 7b173b9a3207fb00284e7b2151a19a96d7f82e3e Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Fri, 19 Nov 2010 01:22:40 -0800 Subject: [PATCH] Bug 104103 - [r=rrelyea a=dolske] --- security/manager/ssl/src/nsCrypto.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/security/manager/ssl/src/nsCrypto.cpp b/security/manager/ssl/src/nsCrypto.cpp index f1c11bb07e16..d08895013a8c 100644 --- a/security/manager/ssl/src/nsCrypto.cpp +++ b/security/manager/ssl/src/nsCrypto.cpp @@ -696,6 +696,10 @@ cryptojs_generateOneKeyPair(JSContext *cx, nsKeyPairInfo *keyPairInfo, (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.