tpm: move length validation to tpm_transmit()
commita147918e79c3a239be59358af659ea9f0959538b
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 14 Feb 2017 19:57:42 +0000 (14 21:57 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 3 Apr 2017 19:46:01 +0000 (3 22:46 +0300)
tree2502fcfffc23e84d930669accc4c60b0da138c2f
parent38eb24ebb01f875f812aa869c4cd62959510111c
tpm: move length validation to tpm_transmit()

Check that the length matches the length reported by the response
header already in tpm_transmit() to improve validation.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Reviewed-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/char/tpm/tpm-interface.c