From: Lennart Poettering Date: Mon, 11 Feb 2013 05:20:55 +0000 (+0100) Subject: efi: fix returned length of efi_get_variable() X-Git-Tag: v198~303 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ff47c895c8c2132ef98ef4182213a0ba79eefb73;p=elogind.git efi: fix returned length of efi_get_variable() --- diff --git a/src/shared/efivars.c b/src/shared/efivars.c index d5cb88cff..09af44a2f 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;