diff options
author | Goffredo Baroncelli <kreijack@inwind.it> | 2022-08-22 21:25:45 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-08-23 07:22:46 +0200 |
commit | 046f101bf6ecbe2c18fd969760256ada3e6230f0 (patch) | |
tree | 28389e7693c488f43746a563c040bc3f580eaed9 /src/shared/efi-api.c | |
parent | 81a7eac1f7179fa61f133842fd959f85016dceb7 (diff) | |
download | systemd-046f101bf6ecbe2c18fd969760256ada3e6230f0.tar.gz |
Allow uneven length BootXXXX variables
The BootXXXX variables may have an uneven length. Don't return error
in this case.
Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
Diffstat (limited to 'src/shared/efi-api.c')
-rw-r--r-- | src/shared/efi-api.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/shared/efi-api.c b/src/shared/efi-api.c index b9faae025b..f3f1091ad4 100644 --- a/src/shared/efi-api.c +++ b/src/shared/efi-api.c @@ -180,9 +180,6 @@ static ssize_t utf16_size(const uint16_t *s, size_t buf_len_bytes) { /* Returns the size of the string in bytes without the terminating two zero bytes */ - if (buf_len_bytes % sizeof(uint16_t) != 0) - return -EINVAL; - while (l < buf_len_bytes / sizeof(uint16_t)) { if (s[l] == 0) return (l + 1) * sizeof(uint16_t); |