mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-08 06:08:04 +00:00
sbat: include NULL terminator when calculating buffer end in parse_sbat()
The parse_sbat() function is currently removing the last character of the passed buffer, which will usually be a null-terminated string to parse. There's no reason to do this and just take the whole size as specified by the caller. Reported-by: Chris Coulson <chris.coulson@canonical.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
parent
496ca920ec
commit
4c9654fb68
2
sbat.c
2
sbat.c
@ -89,7 +89,7 @@ EFI_STATUS
|
|||||||
parse_sbat(char *sbat_base, size_t sbat_size, size_t *sbats, struct sbat_entry ***sbat)
|
parse_sbat(char *sbat_base, size_t sbat_size, size_t *sbats, struct sbat_entry ***sbat)
|
||||||
{
|
{
|
||||||
CHAR8 *current = (CHAR8 *)sbat_base;
|
CHAR8 *current = (CHAR8 *)sbat_base;
|
||||||
CHAR8 *end = (CHAR8 *)sbat_base + sbat_size - 1;
|
CHAR8 *end = (CHAR8 *)sbat_base + sbat_size;
|
||||||
EFI_STATUS efi_status = EFI_SUCCESS;
|
EFI_STATUS efi_status = EFI_SUCCESS;
|
||||||
struct sbat_entry *entry = NULL;
|
struct sbat_entry *entry = NULL;
|
||||||
struct sbat_entry **entries;
|
struct sbat_entry **entries;
|
||||||
|
Loading…
Reference in New Issue
Block a user