summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-12-31 22:03:52 +0200
committerToomas Soome <tsoome@me.com>2020-04-07 08:36:15 +0300
commitc846684c3d36ea4ee89b2cdeb2738e6521376e5a (patch)
tree88940b4620af7b5f0ef7b420f15d377c44c6c6f4
parent4859da614b562d26b86cd0961067070cb5ed350c (diff)
downloadillumos-joyent-c846684c3d36ea4ee89b2cdeb2738e6521376e5a.tar.gz
12412 crypto: variable may be used uninitialized
Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/crypto/io/crypto.c7
-rw-r--r--usr/src/uts/common/crypto/io/cryptoadm.c11
2 files changed, 18 insertions, 0 deletions
diff --git a/usr/src/uts/common/crypto/io/crypto.c b/usr/src/uts/common/crypto/io/crypto.c
index a7c89cb473..bf7616ffdd 100644
--- a/usr/src/uts/common/crypto/io/crypto.c
+++ b/usr/src/uts/common/crypto/io/crypto.c
@@ -1105,6 +1105,7 @@ get_all_mechanism_info(dev_t dev, caddr_t arg, int mode, int *rval)
int error = 0;
int rv;
+ req_count = 0;
STRUCT_INIT(get_all_mech, mode);
STRUCT_INIT(mi, mode);
@@ -2790,6 +2791,7 @@ cipher(dev_t dev, caddr_t arg, int mode,
int rv;
boolean_t rctl_chk = B_FALSE;
+ do_inplace = B_FALSE;
STRUCT_INIT(encrypt, mode);
if ((cm = crypto_hold_minor(getminor(dev))) == NULL) {
@@ -2949,6 +2951,7 @@ cipher_update(dev_t dev, caddr_t arg, int mode,
int rv;
boolean_t rctl_chk = B_FALSE;
+ do_inplace = B_FALSE;
STRUCT_INIT(encrypt_update, mode);
if ((cm = crypto_hold_minor(getminor(dev))) == NULL) {
@@ -5538,6 +5541,7 @@ nostore_generate_key(dev_t dev, caddr_t arg, int mode, int *rval)
boolean_t allocated_by_crypto_module = B_FALSE;
caddr_t u_attrs = NULL;
+ out_count = 0;
STRUCT_INIT(generate_key, mode);
STRUCT_INIT(oa, mode);
@@ -5844,6 +5848,8 @@ nostore_generate_key_pair(dev_t dev, caddr_t arg, int mode, int *rval)
caddr_t u_pub_attrs = NULL;
caddr_t u_pri_attrs = NULL;
+ out_pub_count = 0;
+ out_pri_count = 0;
STRUCT_INIT(generate_key_pair, mode);
STRUCT_INIT(oa, mode);
@@ -6505,6 +6511,7 @@ nostore_derive_key(dev_t dev, caddr_t arg, int mode, int *rval)
boolean_t allocated_by_crypto_module = B_FALSE;
caddr_t u_attrs = NULL;
+ out_count = 0;
STRUCT_INIT(derive_key, mode);
STRUCT_INIT(oa, mode);
diff --git a/usr/src/uts/common/crypto/io/cryptoadm.c b/usr/src/uts/common/crypto/io/cryptoadm.c
index 1192f382d7..008254f610 100644
--- a/usr/src/uts/common/crypto/io/cryptoadm.c
+++ b/usr/src/uts/common/crypto/io/cryptoadm.c
@@ -505,6 +505,10 @@ load_dev_disabled(dev_t dev, caddr_t arg, int mode, int *rval)
uint32_t rv;
int error = 0;
+ entries = NULL;
+ count = 0;
+ instance = 0;
+ rv = CRYPTO_SUCCESS;
if (copyin(arg, &dev_disabled, sizeof (dev_disabled)) != 0) {
error = EFAULT;
goto out2;
@@ -580,6 +584,9 @@ load_soft_disabled(dev_t dev, caddr_t arg, int mode, int *rval)
uint32_t rv;
int error = 0;
+ entries = NULL;
+ count = 0;
+ rv = CRYPTO_SUCCESS;
if (copyin(arg, &soft_disabled, sizeof (soft_disabled)) != 0) {
error = EFAULT;
goto out2;
@@ -660,6 +667,9 @@ load_soft_config(dev_t dev, caddr_t arg, int mode, int *rval)
uint32_t rv;
int error = 0;
+ entries = NULL;
+ count = 0;
+ rv = CRYPTO_SUCCESS;
if (copyin(arg, &soft_config, sizeof (soft_config)) != 0) {
error = EFAULT;
goto out2;
@@ -736,6 +746,7 @@ unload_soft_module(dev_t dev, caddr_t arg, int mode, int *rval)
uint32_t rv;
int error = 0;
+ rv = CRYPTO_SUCCESS;
if (copyin(arg, &unload_soft_module,
sizeof (unload_soft_module)) != 0) {
error = EFAULT;