From d62ddfa0b33cb874f24406fffee0de7e0078dd5a Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Fri, 24 Mar 2006 06:51:24 +0000 Subject: [PATCH] Check argc. b=330900 r=kengert sr=jst --- security/manager/ssl/src/nsCrypto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/manager/ssl/src/nsCrypto.cpp b/security/manager/ssl/src/nsCrypto.cpp index 3793c92194c..16910686982 100644 --- a/security/manager/ssl/src/nsCrypto.cpp +++ b/security/manager/ssl/src/nsCrypto.cpp @@ -1449,7 +1449,7 @@ nsCrypto::GenerateCRMFRequest(nsIDOMCRMFObject** aReturn) /* * Get all of the parameters. */ - if (((argc-5) % 3) != 0) { + if (argc < 5 || ((argc-5) % 3) != 0) { JS_ReportError(cx, "%s", "%s%s\n", JS_ERROR, "incorrect number of parameters"); return NS_ERROR_FAILURE;