am 47aa1049: Merge "Fixes to make_ext4fs when compiled with HAVE_SELINUX."
* commit '47aa1049e80927420b59723806fab579997a7430':
Fixes to make_ext4fs when compiled with HAVE_SELINUX.
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index de38bb0..345ab1e 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -263,7 +263,7 @@
u32 *hdr;
struct ext4_xattr_entry *entry;
size_t name_len = strlen(XATTR_SELINUX_SUFFIX);
- size_t value_len = strlen(secon)+1;
+ size_t value_len;
size_t size, min_offs;
char *val;
@@ -280,6 +280,7 @@
entry->e_name_index = EXT4_XATTR_INDEX_SECURITY;
entry->e_name_len = name_len;
memcpy(entry->e_name, XATTR_SELINUX_SUFFIX, name_len);
+ value_len = strlen(secon)+1;
entry->e_value_size = cpu_to_le32(value_len);
min_offs = (char *)inode + info.inode_size - (char*) entry;
size = EXT4_XATTR_SIZE(value_len);