Re: e2fsprogs coverity patch <cid-11.diff>

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

 



On Wed, Mar 21, 2007 at 02:14:15PM -0500, Dave Kleikamp wrote:
> > > Coverity ID: 11: Overrun Static
> > > 
> > > -	thislen = ((dirent->name_len & 0xFF) < EXT2_NAME_LEN) ?
> > > +	thislen = ((dirent->name_len & 0xFF) <= EXT2_NAME_LEN) ?
> > >  		(dirent->name_len & 0xFF) : EXT2_NAME_LEN;
> > 
> > This change is largely meaningless/unnecessary, since if
> > *dirent->name_len & 0xFF) is equal to EXT2_NAME_LEN it doesn't matter
> > which path is chosen; was there a reason for the change.
> 
> #define EXT2_NAME_LEN 255
> 
> How about this?
> 
> 	thislen = dirent->name_len & 0xFF;

It's unlikely that EXT2_NAME_LEN will ever change, so yes, that's
probably a good idea.  I've alrady committed the patch, though so
we'll do it later.

						- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux