diff options
author | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-26 19:40:56 +0000 |
---|---|---|
committer | alexei.volkov.bugs%sun.com <devnull@localhost> | 2006-04-26 19:40:56 +0000 |
commit | 8f40aa8eb55605b614bbc788e6c5029ee63561f7 (patch) | |
tree | c90af08d07584750531708973e477c6021947011 /security/nss/lib/cryptohi | |
parent | a05e9a6eed311784a78332fbbb5e409832512b05 (diff) | |
download | nss-hg-8f40aa8eb55605b614bbc788e6c5029ee63561f7.tar.gz |
[Bug 334454] Variable "(key)->pkcs11Slot" tracked as NULL was passed to a function that dereferences it. [@ SECKEY_CopyPrivateKey - SSL_ConfigSecureServer]. r=nelson
Diffstat (limited to 'security/nss/lib/cryptohi')
-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 6eaff7203..6dd4390ee 100644 --- a/security/nss/lib/cryptohi/seckey.c +++ b/security/nss/lib/cryptohi/seckey.c @@ -1500,13 +1500,13 @@ SECKEY_CopyPrivateKey(const 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; } |