diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index f79408f9127a..62ecddf26af5 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -596,6 +596,11 @@ static int ntfs_attr_find(const ATTR_TYPE type, const ntfschar *name, le32_to_cpu(ctx->mrec->bytes_allocated); u8 *name_end; + // if (IS_ERR_OR_NULL(a->length)) + // break; + if (a->length == 0) + break; + /* check whether ATTR_RECORD wrap */ if ((u8 *)a < (u8 *)ctx->mrec) break;