aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>2020-02-27 14:15:05 -0300
committerOliver O'Halloran <oohall@gmail.com>2020-03-11 17:14:32 +1100
commite4113f9400ff5366c1bcb395970306612649040b (patch)
tree00953caabc9a96e88b184489159ba03739cd4524 /hw
parent82aed17a5468aff6b600ee1694a10a60f942c018 (diff)
downloadskiboot-e4113f9400ff5366c1bcb395970306612649040b.zip
skiboot-e4113f9400ff5366c1bcb395970306612649040b.tar.gz
skiboot-e4113f9400ff5366c1bcb395970306612649040b.tar.bz2
tpm_i2c_nuvoton: fix tpm_read_fifo overflow check
The tpm_read_fifo expects buflen parameter which is the size of buf parameter. Later it uses buflen to check for an overflow in the case tpm response is bigger than buf capacity. The check is fine, but it doesn't interrupt the code flow, so even though we see error messages about the overflow, it doesn't prevent it. Adding a goto after specifying the error return code fixes it. Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com> Reviewed-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com> Reviewed-by: Claudio Carvalho <cclaudio@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw')
0 files changed, 0 insertions, 0 deletions