From 7e2ee67097a998357511405722bb5b61f2c2b709 Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Mon, 9 Jan 2012 03:54:11 +0100 Subject: [PATCH] ntfswipe.c: Big endian fix for wipe_mft. The 'bytes_in_use' member was not byteswapped after being read from the buffer and used in a calculation. --- ntfsprogs/ntfswipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntfsprogs/ntfswipe.c b/ntfsprogs/ntfswipe.c index 0b7cc722..32b1924f 100644 --- a/ntfsprogs/ntfswipe.c +++ b/ntfsprogs/ntfswipe.c @@ -715,7 +715,7 @@ static s64 wipe_mft(ntfs_volume *vol, int byte, enum action act) } // We know that the end marker will only take 4 bytes - size = *((u32*) (buffer + 0x18)) - 4; + size = le32_to_cpu(*((u32*) (buffer + 0x18))) - 4; if (act == act_info) { //ntfs_log_info("mft %d\n", size);