linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Potter <phil@philpotter.co.uk>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: amir73il@gmail.com, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC][PATCH v3 01/10] fs: common implementation of file type
Date: Wed, 24 Oct 2018 14:33:21 +0100	[thread overview]
Message-ID: <20181024133321.GC23398@pathfinder> (raw)
In-Reply-To: <20181024123740.GA32577@ZenIV.linux.org.uk>

On Wed, Oct 24, 2018 at 01:37:40PM +0100, Al Viro wrote:
> On Tue, Oct 23, 2018 at 09:19:53PM +0100, Phillip Potter wrote:
> 
> > +static inline unsigned char fs_dtype(int filetype)
> 
> That "int" is asking for trouble, especially since negative
> argument will blow up.  And it comes from untrusted source...
> 
> > +{
> > +	if (filetype >= FT_MAX)
> > +		return DT_UNKNOWN;
> > +
> > +	return fs_dtype_by_ftype[filetype];
> > +}

Dear Al,

Thank you, good point, I will change to unsigned int and
republish as part of new series.

Regards,
Phil

  reply	other threads:[~2018-10-24 22:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 20:19 [RFC][PATCH v3 01/10] fs: common implementation of file type Phillip Potter
2018-10-24  6:16 ` Amir Goldstein
2018-10-24  8:21   ` Phillip Potter
2018-10-24  9:20     ` Amir Goldstein
2018-10-24  9:31       ` Phillip Potter
2018-10-24  9:44         ` Amir Goldstein
2018-10-24  9:56           ` Phillip Potter
2018-10-24 10:06             ` Amir Goldstein
2018-10-26 14:45   ` Phillip Potter
2018-10-24 12:37 ` Al Viro
2018-10-24 13:33   ` Phillip Potter [this message]
2018-10-24 13:02 ` Theodore Y. Ts'o
2018-10-24 13:39   ` Phillip Potter
2018-10-24 14:41   ` Amir Goldstein
2018-10-24 19:51     ` Phillip Potter
2018-10-25 11:20 ` Jan Kara
2018-10-25 12:56   ` Phillip Potter
2018-10-25 13:42     ` Jan Kara
2018-10-25 14:24       ` Phillip Potter
  -- strict thread matches above, loose matches on Subject: below --
2018-10-27  0:53 Phillip Potter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181024133321.GC23398@pathfinder \
    --to=phil@philpotter.co.uk \
    --cc=amir73il@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).