summaryrefslogtreecommitdiff
path: root/security/keys/trusted_defined.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/trusted_defined.c')
-rw-r--r--security/keys/trusted_defined.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/keys/trusted_defined.c b/security/keys/trusted_defined.c
index 7b2179589063..f7d06776faf0 100644
--- a/security/keys/trusted_defined.c
+++ b/security/keys/trusted_defined.c
@@ -148,6 +148,11 @@ static int TSS_authhmac(unsigned char *digest, const unsigned char *key,
if (dlen == 0)
break;
data = va_arg(argp, unsigned char *);
+ if (!data) {
+ ret = -EINVAL;
+ va_end(argp);
+ goto out;
+ }
ret = crypto_shash_update(&sdesc->shash, data, dlen);
if (ret < 0) {
va_end(argp);