diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-26 20:55:14 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-26 20:55:14 +0000 |
commit | c49d67c10baed3120b4321e9a42e104a4fbaf92a (patch) | |
tree | b74f30b20e83215d2479d5945d295c31372b8416 | |
parent | 4fce5cc32bae6daffee7c5649cfecbb667fcbbf6 (diff) | |
download | nss-hg-c49d67c10baed3120b4321e9a42e104a4fbaf92a.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; } |