From 094f9b3f2de7718ebfad00431ed9a5ddbc97583c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 26 Jan 2021 10:06:18 +0100 Subject: [PATCH] Fixed a minor endianness ajustment bug The endianness ajustment was the wrong one though it did the correct thing. --- libntfs-3g/index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c index 6fc79d5d..006a6ecd 100644 --- a/libntfs-3g/index.c +++ b/libntfs-3g/index.c @@ -1584,7 +1584,7 @@ static int ntfs_ih_takeout(ntfs_index_context *icx, INDEX_HEADER *ih, freed_space = le32_to_cpu(ih->allocated_size) - le32_to_cpu(ih->index_length); if (full && (freed_space > 0) && !(freed_space & 7)) { - ntfs_ir_truncate(icx, cpu_to_le32(ih->index_length)); + ntfs_ir_truncate(icx, le32_to_cpu(ih->index_length)); /* do nothing if truncation fails */ } ntfs_inode_mark_dirty(icx->actx->ntfs_ino);