summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-02-11 06:20:55 +0100
committerLennart Poettering <lennart@poettering.net>2013-02-11 06:21:20 +0100
commitff47c895c8c2132ef98ef4182213a0ba79eefb73 (patch)
tree74ecec9ca8bfd15c74e220244af0d6ff0ad80bca /src/shared
parentdfbacb6fe56db4820137e4b668c361168fbfe5ff (diff)
efi: fix returned length of efi_get_variable()
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/efivars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index d5cb88cff1..09af44a2fe 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -85,7 +85,7 @@ int efi_get_variable(sd_id128_t vendor, const char *name, uint32_t *attribute, v
((char*) r)[st.st_size - 4 + 1] = 0;
*value = r;
- *size = (size_t) st.st_size;
+ *size = (size_t) st.st_size - 4;
if (attribute)
*attribute = a;