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;