| From: Andrew Morton <akpm@linux-foundation.org> |
| Subject: ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3-checkpatch-fixes |
| Date: Mon Jul 11 01:42:02 PM PDT 2022 |
| |
| |
| ERROR: code indent should use tabs where possible |
| #27: FILE: fs/ntfs/attrib.c:598: |
| +^I^I a->name_length * sizeof(ntfschar);$ |
| |
| total: 1 errors, 0 warnings, 8 lines checked |
| |
| NOTE: For some of the reported defects, checkpatch may be able to |
| mechanically convert to the typical style using --fix or --fix-inplace. |
| |
| NOTE: Whitespace errors detected. |
| You may wish to use scripts/cleanpatch or scripts/cleanfile |
| |
| ./patches/ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3.patch has style problems, please review. |
| |
| NOTE: If any of the errors are false positives, please report |
| them to the maintainer, see CHECKPATCH in MAINTAINERS. |
| |
| Please run checkpatch prior to sending patches |
| |
| Cc: ChenXiaoSong <chenxiaosong2@huawei.com> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| fs/ntfs/attrib.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/fs/ntfs/attrib.c~ntfs-fix-use-after-free-in-ntfs_ucsncmp-v3-checkpatch-fixes |
| +++ a/fs/ntfs/attrib.c |
| @@ -595,7 +595,7 @@ static int ntfs_attr_find(const ATTR_TYP |
| u8 *mrec_end = (u8 *)ctx->mrec + |
| le32_to_cpu(ctx->mrec->bytes_allocated); |
| u8 *name_end = (u8 *)a + le16_to_cpu(a->name_offset) + |
| - a->name_length * sizeof(ntfschar); |
| + a->name_length * sizeof(ntfschar); |
| if ((u8*)a < (u8*)ctx->mrec || (u8*)a > mrec_end || |
| name_end > mrec_end) |
| break; |
| _ |