Re: [RFC][PATCH v3 01/10] fs: common implementation of file type

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

 



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



[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