summaryrefslogtreecommitdiff
path: root/security/nss/lib/softoken/lowcert.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/softoken/lowcert.c')
-rw-r--r--security/nss/lib/softoken/lowcert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/nss/lib/softoken/lowcert.c b/security/nss/lib/softoken/lowcert.c
index 008687e52..629cfe3ce 100644
--- a/security/nss/lib/softoken/lowcert.c
+++ b/security/nss/lib/softoken/lowcert.c
@@ -369,6 +369,10 @@ nsslowcert_KeyFromIssuerAndSN(PRArenaPool *arena,
PORT_SetError(SEC_ERROR_INVALID_ARGS);
goto loser;
}
+ if (len > NSS_MAX_LEGACY_DB_KEY_SIZE) {
+ PORT_SetError(SEC_ERROR_INPUT_LEN);
+ goto loser;
+ }
key->data = (unsigned char*)PORT_ArenaAlloc(arena, len);
if ( !key->data ) {
goto loser;