aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2020-03-30 08:10:28 -0400
committerAlexey Kardashevskiy <aik@ozlabs.ru>2020-05-13 11:25:23 +1000
commitb64b57c9db9a9440252f4d07e7f625e6cf33add7 (patch)
treeffd078f02f88c2b1b0dd572784eec6ddd0bcb800
parent753e473813bfa2f2a7c64ccfc4690b978e557d64 (diff)
downloadSLOF-b64b57c9db9a9440252f4d07e7f625e6cf33add7.zip
SLOF-b64b57c9db9a9440252f4d07e7f625e6cf33add7.tar.gz
SLOF-b64b57c9db9a9440252f4d07e7f625e6cf33add7.tar.bz2
tcgbios: Fix the vendorInfoSize to be of type uint8_t
The vendorInfoSize is a uint8_t rather than a uint32_t. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--lib/libtpm/tcgbios.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libtpm/tcgbios.c b/lib/libtpm/tcgbios.c
index 34b792b..944e86c 100644
--- a/lib/libtpm/tcgbios.c
+++ b/lib/libtpm/tcgbios.c
@@ -646,7 +646,7 @@ static int tpm20_write_EfiSpecIdEventStruct(void)
struct tpms_pcr_selection *sel;
void *nsel, *end;
int event_size;
- uint32_t *vendorInfoSize;
+ uint8_t *vendorInfoSize;
struct tpm_log_entry le = {
.hdr.eventtype = cpu_to_log32(EV_NO_ACTION),
};
@@ -681,7 +681,7 @@ static int tpm20_write_EfiSpecIdEventStruct(void)
event_size = offset_of(struct TCG_EfiSpecIdEventStruct,
digestSizes[count+1]);
- if (event_size > sizeof(event) - sizeof(uint32_t)) {
+ if (event_size > sizeof(event) - sizeof(uint8_t)) {
dprintf("EfiSpecIdEventStruct pad too small\n");
return -1;
}