apply fixes from upstream for issue with 4K sector drives (bz951603) and truncated check for Interix types on a 32-bit CPU (bz958681)
parent
4de25ba227
commit
e3e74104dc
@ -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) {
|
||||||
|
|
@ -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<usa_count;i++) {
|
||||||
|
- u16 *fixup = (u16*)(buffer+bytes_per_sector*i-2); // the value at the end of the sector.
|
||||||
|
+ u16 *fixup = (u16*)(buffer+NTFS_BLOCK_SIZE*i-2); // the value at the end of the sector.
|
||||||
|
u16 saved_val = *(u16*)(buffer+usa_ofs+2*i); // the actual data value that was saved in the us array.
|
||||||
|
|
||||||
|
assert_u32_equal(*fixup, usa, "fixup");
|
Loading…
Reference in new issue