aboutsummaryrefslogtreecommitdiff
path: root/Entity.c
diff options
context:
space:
mode:
authorJocelyn Bohr <bohr@chromium.org>2015-08-20 16:05:05 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-21 16:21:35 +0000
commit5aac5855889e6b7785c34026d00504be2448ad1b (patch)
tree2b8a283eeee846063ba24d7979cff814635ff5a0 /Entity.c
parentc9eeb60f4b0d78f844103c9d8747ab2145d72c5b (diff)
downloadtpm2-5aac5855889e6b7785c34026d00504be2448ad1b.tar.gz
Call marshal functions with correct buffer size.
CL:289647 removed instances of calling marshal functions with size as NULL. This is correct, but the buffer size was not computed correctly in some instances, causing data to not be marshaled. TEST=build tpm2, tpm2-simulator, and trunks, and deploy to DUT On a DUT: $ sudo tpm2-simulator // in one terminal $ sudo trunksd --simulator // in another terminal $ trunks_client --clear // in a third terminal $ trunks_client --own --owner_password="" $ trunks_client --regression_test Trunks is able to take ownership of the software TPM, as well as pass a few regression tests. Prior to this change, trunks failed on taking ownership. BUG=none Change-Id: I46e3a5a30307c832405cc7f91623f87cbece0cb9 Reviewed-on: https://chromium-review.googlesource.com/294883 Tested-by: Jocelyn Bohr <bohr@chromium.org> Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org> Commit-Queue: Jocelyn Bohr <bohr@chromium.org>
Diffstat (limited to 'Entity.c')
-rw-r--r--Entity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Entity.c b/Entity.c
index 2f38b0b..76566b8 100644
--- a/Entity.c
+++ b/Entity.c
@@ -325,7 +325,7 @@ EntityGetName(
)
{
UINT16 nameSize;
- INT32 bufferSize = sizeof(TPMU_NAME);
+ INT32 bufferSize = sizeof(TPM_HANDLE);
switch(HandleGetType(handle))
{
case TPM_HT_TRANSIENT: