diff --git a/ntfs-3g-truncated-check.patch b/ntfs-3g-truncated-check.patch new file mode 100644 index 0000000..4f35cf9 --- /dev/null +++ b/ntfs-3g-truncated-check.patch @@ -0,0 +1,28 @@ +--- src/lowntfs-3g.c.ref 2013-04-04 09:47:16.000000000 +0200 ++++ src/lowntfs-3g.c 2013-05-05 15:08:39.000000000 +0200 +@@ -620,9 +620,9 @@ + * Check whether it's Interix symbolic link, block or + * character device. + */ +- if ((size_t)na->data_size <= sizeof(INTX_FILE_TYPES) ++ if ((u64)na->data_size <= sizeof(INTX_FILE_TYPES) + + sizeof(ntfschar) * PATH_MAX +- && (size_t)na->data_size > ++ && (u64)na->data_size > + sizeof(INTX_FILE_TYPES)) { + INTX_FILE *intx_file; + +--- src/ntfs-3g.c.ref 2013-04-04 09:47:16.000000000 +0200 ++++ src/ntfs-3g.c 2013-05-05 15:09:13.000000000 +0200 +@@ -792,9 +792,9 @@ + * Check whether it's Interix symbolic link, block or + * character device. + */ +- if ((size_t)na->data_size <= sizeof(INTX_FILE_TYPES) ++ if ((u64)na->data_size <= sizeof(INTX_FILE_TYPES) + + sizeof(ntfschar) * PATH_MAX +- && (size_t)na->data_size > ++ && (u64)na->data_size > + sizeof(INTX_FILE_TYPES) + && !stream_name_len) { + diff --git a/ntfs-3g.spec b/ntfs-3g.spec index f8017a2..14a78c6 100644 --- a/ntfs-3g.spec +++ b/ntfs-3g.spec @@ -8,7 +8,7 @@ Name: ntfs-3g Summary: Linux NTFS userspace driver Version: 2013.1.13 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz @@ -25,6 +25,10 @@ Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release} Obsoletes: ntfsprogs-fuse Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release} Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=951603 +Patch1: ntfsck.c.4Ksectors.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=958681 +Patch2: ntfs-3g-truncated-check.patch %description NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS @@ -70,6 +74,8 @@ included utilities see man 8 ntfsprogs after installation). %prep %setup -q -n %{name}_ntfsprogs-%{version}%{?subver} %patch0 -p1 -b .unsupported +%patch1 -p0 -b .4k +%patch2 -p0 -b .truncated %build CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" @@ -168,6 +174,10 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}/README %exclude %{_mandir}/man8/ntfs-3g* %changelog +* Mon May 6 2013 Tom Callaway - 2:2013.1.13-4 +- apply fixes from upstream for issue with 4K sector drives (bz951603) + and truncated check for Interix types on a 32-bit CPU (bz958681) + * Thu Feb 7 2013 Tom Callaway - 2:2013.1.13-3 - drop redundant manpages from ntfsprogs subpackage diff --git a/ntfsck.c.4Ksectors.patch b/ntfsck.c.4Ksectors.patch new file mode 100644 index 0000000..faac2bc --- /dev/null +++ b/ntfsck.c.4Ksectors.patch @@ -0,0 +1,14 @@ +--- ntfsprogs/ntfsck.c.old 2013-01-13 07:46:35.000000000 +0100 ++++ ntfsprogs/ntfsck.c 2013-04-13 12:04:06.000000000 +0200 +@@ -616,9 +616,9 @@ + + // Remove update seq & check it. + usa = *(u16*)(buffer+usa_ofs); // The value that should be at the end of every sector. +- assert_u32_equal(usa_count-1, buflen/bytes_per_sector, "USA length"); ++ assert_u32_equal(usa_count-1, buflen/NTFS_BLOCK_SIZE, "USA length"); + for (i=1;i