crypto/asymmetric_keys/asym_tpm.c:657:8-14: ERROR: referenc
Subsystems (3)
Hi Julia, David,
Quoted 3 lines · Julia Lawall
I can't guess what was intended here, but the kfree on line 652 followed by the memcpy on line 657 looks like a problem.
Right. Somehow I missed a goto here. This should look like this:
- if (r)
+ if (r) {
kfree(digest);- else if (out_digest_len)
+ goto error_free_req;
+ } else if (out_digest_len)
I can fix this in the next version, or if David wants to silently amend that is fine as well.
However, I'd really like to get some feedback on this first regarding whether the hash OIDs are desired to be shared somehow and whether there's a problem in pkcs1pad_sign.
Regards,
-Denis
David Howells
maintainerQuoted 2 lines · Denis Kenzior
I can fix this in the next version, or if David wants to silently amend that is fine as well.
Is the attached change right?
David
---
crypto/asymmetric_keys/asym_tpm.c +5 -3
@@ -647,10 +647,12 @@ static uint8_t *get_digest(const void *in, size_t in_len, crypto_req_done, &cwait); r =crypto_wait_req (crypto_ahash_digest (req), &cwait); - -if (r) +if (r) {kfree (digest); -else if (out_digest_len) + goto error_free_req; + } + +if (out_digest_len) *out_digest_len = digest_len;/* Copy the ASN.1 template before the digest */
Hi David,
Quoted 7 lines · David Howells
Quoted 2 lines · Denis Kenzior
I can fix this in the next version, or if David wants to silently amend that is fine as well.
Is the attached change right?
Looks good to me.
Regards,
-Denis