From 4134c45857a98730b68845f3025c7ac582c1c72b Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 28 Sep 2019 21:53:15 +0200 Subject: Fix dir writer: the index size is stored off-by-one Signed-off-by: David Oberhollenzer --- lib/sqfs/dir_writer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sqfs') 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; -- cgit v1.2.3