This is harmless, but is inconsistent with the non-failure case.
The second commit doesn’t change the TPM’s observable behavior. However, when combined with the first commit, it would allow the bounds checks in TpmFail.c’s Unmarshal16() and Unmarshal32() to be omitted, or even replacing these functions with BYTE_ARRAY_TO_UINT16() and BYTE_ARRAY_TO_UINT32() respectively. I did not make this change as it would be a slightly larger refactor. I’m fine with keeping the second commit, dropping it entirely, or squashing it into the first commit.
This is harmless, but is inconsistent with the non-failure case.
The second commit doesn’t change the TPM’s observable behavior. However, when combined with the first commit, it would allow the bounds checks in
TpmFail.c
’sUnmarshal16()
andUnmarshal32()
to be omitted, or even replacing these functions withBYTE_ARRAY_TO_UINT16()
andBYTE_ARRAY_TO_UINT32()
respectively. I did not make this change as it would be a slightly larger refactor. I’m fine with keeping the second commit, dropping it entirely, or squashing it into the first commit.