| @@ -757,12 +757,6 @@ static int ntfs_read_locked_inode(struct inode *vi) · 756 unmodified lines |
| 757 | 757 | } |
| 758 | 758 | a = ctx->attr; |
| 759 | 759 | /* Get the standard information attribute value. */ |
| 760 | | − if ((u8 *)a + le16_to_cpu(a->data.resident.value_offset) |
| 761 | | − + le32_to_cpu(a->data.resident.value_length) > |
| 762 | | − (u8 *)ctx->mrec + vol->mft_record_size) { |
| 763 | | − ntfs_error(vi->i_sb, "Corrupt standard information attribute in inode."); |
| 764 | | − goto unm_err_out; |
| 765 | | − } |
| 766 | 760 | si = (struct standard_information *)((u8 *)a + |
| 767 | 761 | le16_to_cpu(a->data.resident.value_offset)); |
| 768 | 762 | |
| @@ -849,13 +843,6 @@ static int ntfs_read_locked_inode(struct inode *vi) · 80 unmodified lines |
| 849 | 843 | goto unm_err_out; |
| 850 | 844 | } |
| 851 | 845 | } else /* if (!a->non_resident) */ { |
| 852 | | − if ((u8 *)a + le16_to_cpu(a->data.resident.value_offset) |
| 853 | | − + le32_to_cpu( |
| 854 | | − a->data.resident.value_length) > |
| 855 | | − (u8 *)ctx->mrec + vol->mft_record_size) { |
| 856 | | − ntfs_error(vi->i_sb, "Corrupt attribute list in inode."); |
| 857 | | − goto unm_err_out; |
| 858 | | − } |
| 859 | 846 | /* Now copy the attribute list. */ |
| 860 | 847 | memcpy(ni->attr_list, (u8 *)a + le16_to_cpu( |
| 861 | 848 | a->data.resident.value_offset), |
| @@ -954,10 +941,6 @@ view_index_meta: · 92 unmodified lines |
| 954 | 941 | ir = (struct index_root *)((u8 *)a + |
| 955 | 942 | le16_to_cpu(a->data.resident.value_offset)); |
| 956 | 943 | ir_end = (u8 *)ir + le32_to_cpu(a->data.resident.value_length); |
| 957 | | − if (ir_end > (u8 *)ctx->mrec + vol->mft_record_size) { |
| 958 | | − ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is corrupt."); |
| 959 | | − goto unm_err_out; |
| 960 | | − } |
| 961 | 944 | index_end = (u8 *)&ir->index + |
| 962 | 945 | le32_to_cpu(ir->index.index_length); |
| 963 | 946 | if (index_end > ir_end) { |
| @@ -1552,10 +1535,6 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) · 588 unmodified lines |
| 1552 | 1535 | |
| 1553 | 1536 | ir = (struct index_root *)((u8 *)a + le16_to_cpu(a->data.resident.value_offset)); |
| 1554 | 1537 | ir_end = (u8 *)ir + le32_to_cpu(a->data.resident.value_length); |
| 1555 | | − if (ir_end > (u8 *)ctx->mrec + vol->mft_record_size) { |
| 1556 | | − ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is corrupt."); |
| 1557 | | − goto unm_err_out; |
| 1558 | | − } |
| 1559 | 1538 | index_end = (u8 *)&ir->index + le32_to_cpu(ir->index.index_length); |
| 1560 | 1539 | if (index_end > ir_end) { |
| 1561 | 1540 | ntfs_error(vi->i_sb, "Index is corrupt."); |
| @@ -1999,13 +1978,6 @@ int ntfs_read_inode_mount(struct inode *vi) · 437 unmodified lines |
| 1999 | 1978 | goto put_err_out; |
| 2000 | 1979 | } |
| 2001 | 1980 | } else /* if (!ctx.attr->non_resident) */ { |
| 2002 | | − if ((u8 *)a + le16_to_cpu( |
| 2003 | | − a->data.resident.value_offset) + |
| 2004 | | − le32_to_cpu(a->data.resident.value_length) > |
| 2005 | | − (u8 *)ctx->mrec + vol->mft_record_size) { |
| 2006 | | − ntfs_error(sb, "Corrupt attribute list attribute."); |
| 2007 | | − goto put_err_out; |
| 2008 | | − } |
| 2009 | 1981 | /* Now copy the attribute list. */ |
| 2010 | 1982 | memcpy(ni->attr_list, (u8 *)a + le16_to_cpu( |
| 2011 | 1983 | a->data.resident.value_offset), |