diff options
author | David Keeler <dkeeler@mozilla.com> | 2018-02-27 10:47:16 +0100 |
---|---|---|
committer | David Keeler <dkeeler@mozilla.com> | 2018-02-27 10:47:16 +0100 |
commit | d329040789c889cd83372835f32f3859105f4bd0 (patch) | |
tree | 6223797bddb3989a9a74e4d63da7be0d44ee06b4 /lib/dev | |
parent | 89175c78faa076ba0d1be9cfe845f97c8a70e0fd (diff) | |
download | nss-hg-d329040789c889cd83372835f32f3859105f4bd0.tar.gz |
Bug 1438277 - Be even more defensive about bad token implementations in nssCryptokiObject_Create r=ttaubert
Summary: add a null check in nssCryptokiObject_Create that seems to be necessary
Reviewers: ttaubert
Reviewed By: ttaubert
Bug #: 1438277
Differential Revision: https://phabricator.services.mozilla.com/D640
Diffstat (limited to 'lib/dev')
-rw-r--r-- | lib/dev/devutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dev/devutil.c b/lib/dev/devutil.c index 42ce03c97..74c32f088 100644 --- a/lib/dev/devutil.c +++ b/lib/dev/devutil.c @@ -32,7 +32,7 @@ nssCryptokiObject_Create( /* a failure here indicates a device error */ return (nssCryptokiObject *)NULL; } - if (cert_template[0].ulValueLen == 0) { + if (cert_template[0].ulValueLen == 0 || !cert_template[0].pValue) { nss_ZFreeIf(cert_template[1].pValue); return (nssCryptokiObject *)NULL; } |