summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-01 15:30:16 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-01 15:30:44 +0200
commit7073f002b54c690ffa17d9f736a4417485d3c6d6 (patch)
tree8222c6f3ef65c056b6aeead73a1f9ee3f5e05424
parent583331233a21c554f546fffa3ceebc0143085c9f (diff)
Fix xattr writer size accounting
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/sqfs/write_xattr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqfs/write_xattr.c b/lib/sqfs/write_xattr.c
index 712c6e9..98829e8 100644
--- a/lib/sqfs/write_xattr.c
+++ b/lib/sqfs/write_xattr.c
@@ -48,7 +48,6 @@ bool sqfs_has_xattr(const char *key)
static int write_key(meta_writer_t *mw, const char *key, tree_xattr_t *xattr,
bool value_is_ool)
{
- const char *orig_key = key;
sqfs_xattr_entry_t kent;
int type;
@@ -73,7 +72,7 @@ static int write_key(meta_writer_t *mw, const char *key, tree_xattr_t *xattr,
if (meta_writer_append(mw, key, strlen(key)))
return -1;
- xattr->size += sizeof(sqfs_xattr_entry_t) + strlen(orig_key);
+ xattr->size += sizeof(sqfs_xattr_entry_t) + strlen(key);
return 0;
}