aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-28 21:53:15 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-28 22:36:00 +0200
commit4134c45857a98730b68845f3025c7ac582c1c72b (patch)
treec3757227542f25c63a12b8b922fe53910f0c0d7c
parent56b3a1fc932ee7cccb2196c81b14b4ed93615b05 (diff)
Fix dir writer: the index size is stored off-by-one
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/sqfs/dir_writer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c
index 3598dd2..ffe14f4 100644
--- a/lib/sqfs/dir_writer.c
+++ b/lib/sqfs/dir_writer.c
@@ -318,7 +318,8 @@ sqfs_inode_generic_t
inode->data.dir_ext.parent_inode = parent_ino;
inode->data.dir_ext.offset = block_offset;
inode->data.dir_ext.xattr_idx = xattr;
- inode->data.dir_ext.inodex_count = writer->idx_size;
+ inode->data.dir_ext.inodex_count =
+ writer->idx_size ? (writer->idx_size - 1) : 0;
}
return inode;