Re: [PATCH 2/3] orangefs: strncpy -> strlcpy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 8 Apr 2016, Andy Shevchenko wrote:

> On Fri, Apr 8, 2016 at 6:34 PM,  <martin@xxxxxxxxxxxx> wrote:
> >> On Thu, Apr 7, 2016 at 2:39 PM, Andy Shevchenko
> >> <andy.shevchenko@xxxxxxxxx> wrote:
> >> > On Mon, Apr 4, 2016 at 11:26 PM, Martin Brandenburg <martin@xxxxxxxxxxxx> wrote:
> >> >> From: Martin Brandenburg <martin@xxxxxxxxxxxx>
> >> >>
> >> >> Almost everywhere we use strncpy we should use strlcpy. This affects
> >> >> path names (d_name mostly), symlink targets, and server names.
> >> >>
> >> >> Leave debugfs code as is for now, though it could use a review as well.
> >> >>
> >> >
> >> > |Why not strscpy() as most robust one?
> >
> > Mostly because I hadn't heard about strscpy.
> 
> It was nice story how he applied it to the tree.

Just read it..

> 
> >> It looks like strscpy went in last October... there are
> >> no users of it yet. I was just about to send in a pull request
> >> that includes Martin's strncpy->strlcpy patch when I saw
> >> Andy's comment.
> >>
> >> Linus said when he pulled strscpy:
> 
> > After looking over strscpy I don't see a compelling
> > reason not to go ahead and use it while we're fixing up
> > this code.
> 
> I recommend to mention that this is a fix explicitly in the commit
> message, currently it sounds like a meaningless patch of trainee.

I've decided to scrap most of this, but one change is
important. Most of it is a no-op because the client-core
buffer is larger than NAME_MAX and there is always room.
Replying with patch in a minute.

Thanks for the review!

Mike, I think we can delay this one for later so we can
look at the debugfs and superblock code in more detail.

-- Martin

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux