diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-26 19:41:30 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-26 19:41:30 +0000 |
commit | 0da81191a9f55bea465b6082ca99050783102d44 (patch) | |
tree | b74f30b20e83215d2479d5945d295c31372b8416 | |
parent | 961342fbe790f3472f4672023c01db453f112e5d (diff) | |
download | nss-hg-0da81191a9f55bea465b6082ca99050783102d44.tar.gz |
[Bug 334454] Variable "(key)->pkcs11Slot" tracked as NULL was passed to a function that dereferences it. [@ SECKEY_CopyPrivateKey - SSL_ConfigSecureServer]. r=nelson
-rw-r--r-- | security/nss/lib/cryptohi/seckey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/nss/lib/cryptohi/seckey.c b/security/nss/lib/cryptohi/seckey.c index 0a6964ca1..d2bd046e1 100644 --- a/security/nss/lib/cryptohi/seckey.c +++ b/security/nss/lib/cryptohi/seckey.c @@ -1498,13 +1498,13 @@ SECKEY_CopyPrivateKey(SECKEYPrivateKey *privk) SECKEYPrivateKey *copyk; PRArenaPool *arena; - if (privk == NULL) { + if (!privk || !privk->pkcs11Slot) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); return NULL; } arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (arena == NULL) { - PORT_SetError (SEC_ERROR_NO_MEMORY); return NULL; } |