[PATCH 07/10] dmicheck: fix wrong length for reserved fields in type 13
Colin Ian King
colin.king at canonical.com
Thu May 21 07:11:14 UTC 2020
On 21/05/2020 03:37, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
> src/dmi/dmicheck/dmicheck.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index d163bed3..f23c353b 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -1501,7 +1501,7 @@ static void dmicheck_entry(fwts_framework *fw,
> dmi_reserved_bits_check(fw, table, addr, "Flags", hdr, sizeof(uint8_t), 0x5, 1, 7);
> if (hdr->length < 0x15)
> break;
> - for (i = 0x6; i < 0x15; i++)
> + for (i = 0x6; i < 15; i++)
> dmi_reserved_uint8_check(fw, table, addr, "Reserved", hdr, i);
> if (hdr->length < 0x16)
> break;
>
Is the hdr length check incorrect too?
Also, for (i = 0x6; i < 15; i++)
maybe should be for (i = 0x6; i < 0xf; i++)
More information about the fwts-devel
mailing list