chiark / gitweb /
efi: fix returned length of efi_get_variable()
authorLennart Poettering <lennart@poettering.net>
Mon, 11 Feb 2013 05:20:55 +0000 (06:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Feb 2013 05:21:20 +0000 (06:21 +0100)
src/shared/efivars.c

index d5cb88c..09af44a 100644 (file)
@@ -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;