summaryrefslogtreecommitdiff
path: root/src/shared/efi-api.c
diff options
context:
space:
mode:
authorGoffredo Baroncelli <kreijack@inwind.it>2022-08-22 21:25:45 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-08-23 07:22:46 +0200
commit046f101bf6ecbe2c18fd969760256ada3e6230f0 (patch)
tree28389e7693c488f43746a563c040bc3f580eaed9 /src/shared/efi-api.c
parent81a7eac1f7179fa61f133842fd959f85016dceb7 (diff)
downloadsystemd-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.c3
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);