From: Al Viro <viro@ZenIV.linux.org.uk>
To: Phillip Potter <phil@philpotter.co.uk>
Cc: linux-kernel@vger.kernel.org, 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 13:37:40 +0100 [thread overview]
Message-ID: <20181024123740.GA32577@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20181023201953.GA15687@pathfinder>
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];
> +}
next prev parent reply other threads:[~2018-10-24 21:05 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 [this message]
2018-10-24 13:33 ` Phillip Potter
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=20181024123740.GA32577@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phil@philpotter.co.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).