]> git.proxmox.com Git - libtpms.git/commit
tpm2: Check returned buffer pointer after call to _rpc__Send_Command()
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Sun, 9 Dec 2018 19:01:22 +0000 (14:01 -0500)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 10 Dec 2018 14:17:25 +0000 (09:17 -0500)
commitb1832e9fedcdd58519105a7ffc3706692e5361fc
treef1bac9c88a31b15e0462dc1f94d381d103bf2784
parentad041fd1d48edcffdd919fc61106846eaa944725
tpm2: Check returned buffer pointer after call to _rpc__Send_Command()

_rcp__SendCommand() may come back with a different buffer than what was
passed in. This happens when the TPM 2 is in failure more and the TPM 2
code uses an internal buffer. In this case we just copy from that inter-
nal buffer into the buffer that was passed into the function.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
src/tpm_tpm2_interface.c