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>
diff --git a/Ticket.c b/Ticket.c
index 0f8b7f1..b6bceaf 100644
--- a/Ticket.c
+++ b/Ticket.c
@@ -35,7 +35,7 @@
       if(buffer->size < sizeof(valueToCompare))
           return FALSE;
       marshalBuffer = bufferToCompare;
-      bufferSize = sizeof(valueToCompare);
+      bufferSize = sizeof(TPM_GENERATED);
    TPM_GENERATED_Marshal(&valueToCompare, &marshalBuffer, &bufferSize);
    if(MemoryEqual(buffer->buffer, bufferToCompare, sizeof(valueToCompare)))
        return FALSE;