am 0a726d10: Merge "ext_utils: xattr_free_space assert"

* commit '0a726d107744add5ea656bca6b214ba3c8100ee6':
  ext_utils: xattr_free_space assert
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index e4e3881..8b2b0fd 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -267,6 +267,7 @@
  */
 static size_t xattr_free_space(struct ext4_xattr_entry *entry, char *end)
 {
+        end -= sizeof(uint32_t); /* Required four null bytes */
 	while(!IS_LAST_ENTRY(entry) && (((char *) entry) < end)) {
 		end   -= EXT4_XATTR_SIZE(le32_to_cpu(entry->e_value_size));
 		entry  = EXT4_XATTR_NEXT(entry);
@@ -277,7 +278,7 @@
 		return 0;
 	}
 
-	return (end - ((char *) entry)) - sizeof(uint32_t);
+	return end - ((char *) entry);
 }
 
 /*