mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-13 13:45:16 +00:00
Lengths that might be -1 can't be unsigned, Peter.
Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
e62b69a5b0
commit
27129a5a05
@ -307,10 +307,10 @@ static EFI_STATUS parseDhcp6()
|
||||
static EFI_STATUS parseDhcp4()
|
||||
{
|
||||
CHAR8 *template = (CHAR8 *)translate_slashes(DEFAULT_LOADER_CHAR);
|
||||
UINTN template_len = strlen(template) + 1;
|
||||
INTN template_len = strlen(template) + 1;
|
||||
|
||||
UINTN dir_len = strnlena(pxe->Mode->DhcpAck.Dhcpv4.BootpBootFile, 127);
|
||||
UINTN i;
|
||||
INTN dir_len = strnlena(pxe->Mode->DhcpAck.Dhcpv4.BootpBootFile, 127);
|
||||
INTN i;
|
||||
UINT8 *dir = pxe->Mode->DhcpAck.Dhcpv4.BootpBootFile;
|
||||
|
||||
for (i = dir_len; i >= 0; i--) {
|
||||
@ -329,6 +329,8 @@ static EFI_STATUS parseDhcp4()
|
||||
if (full_path[dir_len-1] == '/' && template[0] == '/')
|
||||
full_path[dir_len-1] = '\0';
|
||||
}
|
||||
if (dir_len == 0 && dir[0] != '/' && template[0] == '/')
|
||||
template++;
|
||||
strcata(full_path, template);
|
||||
memcpy(&tftp_addr.v4, pxe->Mode->DhcpAck.Dhcpv4.BootpSiAddr, 4);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user