summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/cryptohi
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-07-18 15:58:00 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-07-18 15:58:00 +0200
commit2539ce925195a9524521c5d87fd3441d964d03d3 (patch)
tree00fd2cf658129d6c30e1dbb4f9c54d83321157db /security/nss/lib/cryptohi
parentca0083022fad1f9fb2a7b1d4b94f32402026e3e6 (diff)
parent89bd45bf91e0611449a93cbc978bdd6654109c46 (diff)
downloadUXP-2539ce925195a9524521c5d87fd3441d964d03d3.tar
UXP-2539ce925195a9524521c5d87fd3441d964d03d3.tar.gz
UXP-2539ce925195a9524521c5d87fd3441d964d03d3.tar.lz
UXP-2539ce925195a9524521c5d87fd3441d964d03d3.tar.xz
UXP-2539ce925195a9524521c5d87fd3441d964d03d3.zip
Merge branch 'nss-work'
Diffstat (limited to 'security/nss/lib/cryptohi')
-rw-r--r--security/nss/lib/cryptohi/seckey.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/nss/lib/cryptohi/seckey.c b/security/nss/lib/cryptohi/seckey.c
index 080909772..173096050 100644
--- a/security/nss/lib/cryptohi/seckey.c
+++ b/security/nss/lib/cryptohi/seckey.c
@@ -639,6 +639,11 @@ seckey_ExtractPublicKey(const CERTSubjectPublicKeyInfo *spki)
return pubk;
break;
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
+ /* A basic sanity check on inputs. */
+ if (spki->algorithm.parameters.len == 0 || newOs.len == 0) {
+ PORT_SetError(SEC_ERROR_INPUT_LEN);
+ break;
+ }
pubk->keyType = ecKey;
pubk->u.ec.size = 0;