On Sat, Mar 28, 2020 at 5:30 AM Stefan Berger <stef...@linux.vnet.ibm.com> wrote: > > The vendorInfoSize is a u8 rather than a u32. > > Signed-off-by: Stefan Berger <stef...@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > src/tcgbios.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/tcgbios.c b/src/tcgbios.c > index 997da87..99005b9 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); > > -- > 2.24.1 > _______________________________________________ > SeaBIOS mailing list -- seabios@seabios.org > To unsubscribe send an email to seabios-le...@seabios.org > _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org