aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2021-04-11 10:59:23 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2021-04-11 11:04:35 -0700
commit989984514ccd9f27a25dc838666b8ef6c4b7ecb2 (patch)
tree45bdae0244e1664f2f7c3a78770ad2e730545cff
parent7cffabd7ddff8aa762256fc6195e2d8b656ab6f2 (diff)
downloadopenssl_tpm2_engine-989984514ccd9f27a25dc838666b8ef6c4b7ecb2.tar.gz
intel-tss: Fix wrong written length in the Marshal commands
The written parameter should be set incrementally not absolutely. Fortunately, this bug doesn't manifest in the current engine, because there's no sequence of marshal commands, but it will manifest in future updates. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--intel-tss.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intel-tss.h b/intel-tss.h
index 92cc035..0fda8c1 100644
--- a/intel-tss.h
+++ b/intel-tss.h
@@ -151,7 +151,7 @@ TSS_##TYPE##_Marshal(const TYPE *source, UINT16 *written, \
\
*buffer += offset; \
*size -= offset; \
- *written = offset; \
+ *written += offset; \
\
return rc; \
}