Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8158/ntfsprogs
Modified Files:
ntfsfix.c
Log Message:
Fix endianness bug (le16 instead of le32 when accessing mft record
bytes_in_use) in volume.c::ntfs_volume_write_flags() and
ntfsfix.c::OLD_ntfs_volume_set_flags(). (Anton)
Index: ntfsfix.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsfix.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- ntfsfix.c 12 Oct 2005 11:52:41 -0000 1.22
+++ ntfsfix.c 15 Oct 2005 23:13:50 -0000 1.23
@@ -210,7 +210,7 @@ static int OLD_ntfs_volume_set_flags(ntf
c = (VOLUME_INFORMATION*)(le16_to_cpu(a->value_offset) + (char*)a);
/* Sanity checks. */
if ((char*)c + le32_to_cpu(a->value_length) >
- le16_to_cpu(m->bytes_in_use) + (char*)m ||
+ (char*)m + le32_to_cpu(m->bytes_in_use) ||
le16_to_cpu(a->value_offset) +
le32_to_cpu(a->value_length) > le32_to_cpu(a->length)) {
Dputs("Error: Attribute $VOLUME_INFORMATION in $Volume is "
|