From: Theodore Tso <tytso@mit.edu>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: "Brian D. Behlendorf" <behlendorf1@llnl.gov>,
linux-ext4@vger.kernel.org, adilger@clusterfs.com,
wartens2@llnl.gov
Subject: Re: e2fsprogs coverity patch <cid-11.diff>
Date: Wed, 21 Mar 2007 20:52:42 -0400 [thread overview]
Message-ID: <20070322005242.GA23643@thunk.org> (raw)
In-Reply-To: <1174504455.13386.30.camel@kleikamp.austin.ibm.com>
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
prev parent reply other threads:[~2007-03-22 0:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-10 2:11 e2fsprogs coverity patch <cid-11.diff> Brian D. Behlendorf
2007-03-21 18:54 ` Theodore Tso
2007-03-21 19:14 ` Dave Kleikamp
2007-03-22 0:52 ` Theodore Tso [this message]
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=20070322005242.GA23643@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@clusterfs.com \
--cc=behlendorf1@llnl.gov \
--cc=linux-ext4@vger.kernel.org \
--cc=shaggy@linux.vnet.ibm.com \
--cc=wartens2@llnl.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.