[Skiboot] [PATCH] tpm_i2c_nuvoton: fix tpm_read_fifo overflow check

Oliver O'Halloran oohall at gmail.com
Mon Mar 30 17:26:49 AEDT 2020


On Fri, Feb 28, 2020 at 4:15 AM Mauro S. M. Rodrigues
<maurosr at linux.vnet.ibm.com> wrote:
>
> 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 at linux.vnet.ibm.com>

Thanks, merged as e4113f9400ff5366c1bcb395970306612649040b


More information about the Skiboot mailing list