mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-03 12:09:33 +00:00
MokManager: stop using StrnCat
StrnCat is not available in gnu-efi-3.0.5 (I did not check if it does actually exists in 3.0.6). Moreover using strcat on a buffer where we've just done: "buf[0] = '\0'" is a bit silly, we might as well drop the 0 termination and just use strcpy. It seems there also is no StrnCpy in gnu-efi-3.0.5, but we are passing in a pointer to the end of file_name minus 4, so strcpy will consume only 4 bytes anyways and there is no need for the "n". Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
7faf9e86c3
commit
6aa5a62515
@ -1913,8 +1913,7 @@ static BOOLEAN check_der_suffix(CHAR16 * file_name)
|
||||
if (!file_name || StrLen(file_name) <= 4)
|
||||
return FALSE;
|
||||
|
||||
suffix[0] = '\0';
|
||||
StrnCat(suffix, file_name + StrLen(file_name) - 4, 4);
|
||||
StrCpy(suffix, file_name + StrLen(file_name) - 4);
|
||||
|
||||
StrLwr(suffix);
|
||||
for (i = 0; der_suffix[i] != NULL; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user