"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libntfs-3g/logfile.c" between
ntfs-3g_ntfsprogs-2016.2.22.tgz and ntfs-3g_ntfsprogs-2017.3.23.tgz

About: NTFS-3G is a read-write NTFS driver for Linux and other operating systems. It provides safe handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008, Windows 7 and Windows 8 NTFS file systems.

logfile.c  (ntfs-3g_ntfsprogs-2016.2.22.tgz):logfile.c  (ntfs-3g_ntfsprogs-2017.3.23.tgz)
skipping to change at line 122 skipping to change at line 122
/* Verify the size of the update sequence array. */ /* Verify the size of the update sequence array. */
usa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS); usa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS);
if (usa_count != le16_to_cpu(rp->usa_count)) { if (usa_count != le16_to_cpu(rp->usa_count)) {
ntfs_log_error("$LogFile restart page specifies " ntfs_log_error("$LogFile restart page specifies "
"inconsistent update sequence array count.\n"); "inconsistent update sequence array count.\n");
return FALSE; return FALSE;
} }
/* Verify the position of the update sequence array. */ /* Verify the position of the update sequence array. */
usa_ofs = le16_to_cpu(rp->usa_ofs); usa_ofs = le16_to_cpu(rp->usa_ofs);
usa_end = usa_ofs + usa_count * sizeof(u16); usa_end = usa_ofs + usa_count * sizeof(u16);
if (usa_ofs < sizeof(RESTART_PAGE_HEADER) || if (usa_ofs < offsetof(RESTART_PAGE_HEADER, usn) ||
usa_end > NTFS_BLOCK_SIZE - sizeof(u16)) { usa_end > NTFS_BLOCK_SIZE - sizeof(u16)) {
ntfs_log_error("$LogFile restart page specifies " ntfs_log_error("$LogFile restart page specifies "
"inconsistent update sequence array offset.\n"); "inconsistent update sequence array offset.\n");
return FALSE; return FALSE;
} }
skip_usa_checks: skip_usa_checks:
/* /*
* Verify the position of the restart area. It must be: * Verify the position of the restart area. It must be:
* - aligned to 8-byte boundary, * - aligned to 8-byte boundary,
* - after the update sequence array, and * - after the update sequence array, and
* - within the system page size. * - within the system page size.
*/ */
ra_ofs = le16_to_cpu(rp->restart_area_offset); ra_ofs = le16_to_cpu(rp->restart_area_offset);
if (ra_ofs & 7 || (have_usa ? ra_ofs < usa_end : if (ra_ofs & 7 || (have_usa ? ra_ofs < usa_end :
ra_ofs < sizeof(RESTART_PAGE_HEADER)) || ra_ofs < offsetof(RESTART_PAGE_HEADER, usn)) ||
ra_ofs > logfile_system_page_size) { ra_ofs > logfile_system_page_size) {
ntfs_log_error("$LogFile restart page specifies " ntfs_log_error("$LogFile restart page specifies "
"inconsistent restart area offset.\n"); "inconsistent restart area offset.\n");
return FALSE; return FALSE;
} }
/* /*
* Only restart pages modified by chkdsk are allowed to have chkdsk_lsn * Only restart pages modified by chkdsk are allowed to have chkdsk_lsn
* set. * set.
*/ */
if (!ntfs_is_chkd_record(rp->magic) && sle64_to_cpu(rp->chkdsk_lsn)) { if (!ntfs_is_chkd_record(rp->magic) && sle64_to_cpu(rp->chkdsk_lsn)) {
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS