summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys/mscode_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asymmetric_keys/mscode_parser.c')
-rw-r--r--crypto/asymmetric_keys/mscode_parser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/mscode_parser.c b/crypto/asymmetric_keys/mscode_parser.c
index 6a76d5c..9492e1c 100644
--- a/crypto/asymmetric_keys/mscode_parser.c
+++ b/crypto/asymmetric_keys/mscode_parser.c
@@ -124,5 +124,10 @@ int mscode_note_digest(void *context, size_t hdrlen,
struct pefile_context *ctx = context;
ctx->digest = kmemdup(value, vlen, GFP_KERNEL);
- return ctx->digest ? 0 : -ENOMEM;
+ if (!ctx->digest)
+ return -ENOMEM;
+
+ ctx->digest_len = vlen;
+
+ return 0;
}
OpenPOWER on IntegriCloud