[systemd-commits] src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Sun Feb 10 21:24:15 PST 2013


 src/shared/efivars.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ff47c895c8c2132ef98ef4182213a0ba79eefb73
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Feb 11 06:20:55 2013 +0100

    efi: fix returned length of efi_get_variable()

diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index d5cb88c..09af44a 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;



More information about the systemd-commits mailing list