diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2020-03-30 07:55:56 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-04-19 11:35:34 -0400 |
commit | adaf988b227533cf1cbbac84de17d8f07be81833 (patch) | |
tree | 09ef213d4e813619a229a0f1dfb4789efe0f061a | |
parent | 80fce2c2eba832145ff85d412345c52e68481198 (diff) | |
download | seabios-adaf988b227533cf1cbbac84de17d8f07be81833.tar.gz |
tcgbios: Fix the vendorInfoSize to be of type u8
The vendorInfoSize is a u8 rather than a u32.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r-- | src/tcgbios.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tcgbios.c b/src/tcgbios.c index cc3a51f2..6a3a613d 100644 --- a/src/tcgbios.c +++ b/src/tcgbios.c @@ -287,7 +287,7 @@ tpm20_write_EfiSpecIdEventStruct(void) int event_size = offsetof(struct TCG_EfiSpecIdEventStruct , digestSizes[count+1]); - if (event_size > sizeof(event) - sizeof(u32)) { + if (event_size > sizeof(event) - sizeof(u8)) { dprintf(DEBUG_tcg, "EfiSpecIdEventStruct pad too small\n"); return -1; } @@ -307,7 +307,7 @@ tpm20_write_EfiSpecIdEventStruct(void) event.hdr.numberOfAlgorithms = numAlgs; int event_size = offsetof(struct TCG_EfiSpecIdEventStruct , digestSizes[numAlgs]); - u32 *vendorInfoSize = (void*)&event + event_size; + u8 *vendorInfoSize = (void*)&event + event_size; *vendorInfoSize = 0; event_size += sizeof(*vendorInfoSize); |