[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220826155405.7506-1-yin31149@gmail.com>
Date: Fri, 26 Aug 2022 23:54:05 +0800
From: Hawkins Jiawei <yin31149@...il.com>
To: yin31149@...il.com
Cc: akpm@...ux-foundation.org, anton@...era.com,
chenxiaosong2@...wei.com, dan.carpenter@...cle.com,
linux-kernel@...r.kernel.org, linux-ntfs-dev@...ts.sourceforge.net,
syzbot+5f8dcabe4a3b2c51c607@...kaller.appspotmail.com,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] ntfs: change check order in ntfs_attr_find
On Fri, 26 Aug 2022 at 23:49, Hawkins Jiawei <yin31149@...il.com> wrote:
>
> >
> > Btw, this was in the original code, but those casts are ugly. Ideally
> > there would be some way to get rid of them. But otherwise at least
> > put a space after the u8. "(u8 *)a < (u8 *)ctx->mrec".
> >
> > > u8 *name_end = (u8 *)a + le16_to_cpu(a->name_offset) +
> > > a->name_length * sizeof(ntfschar);
> > > - if ((u8*)a < (u8*)ctx->mrec || (u8*)a > mrec_end ||
> > > - name_end > mrec_end)
> > > + if (name_end > mrec_end)
> > > break;
> >
> > regards,
> > dan carpenter
> So maybe I can try to refactor these codes. But I wonder if this can be
> done in a seperate bug
Sorry for the typing error. I mean refactoring these code
in another seperate patch seems better.
Powered by blists - more mailing lists