LKML Archive on
help / color / mirror / Atom feed
From: Tigran Aivazian <>
To: Walter Harms <>
Cc: Dan Carpenter <>,
	"" <>,
Subject: Re: [PATCH] bfs: prevent underflow in bfs_find_entry()
Date: Tue, 10 Mar 2020 18:22:42 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


On Tue, 10 Mar 2020 at 17:57, Walter Harms <> wrote:
> that raises the question why is there a len paramter in the first place.
> Surely the writer can make sure that there is always a NUL terminated
> string, then it would be possible the use a simple strcmp() and the
> range check is useless and can be removed.
> seems a question for the maintainer.

Please have a look at, for example,
fs/ufs/dir.c:ufs_find_entry()/ufs_match() functions --- they do almost
the same thing as the ones in bfs. And, presumably, the line "int
namelen = qstr->len;" in ufs_find_entry() is causing the static
checker warning too, just like the one in bfs which Dan mentioned and
fixed. So, let's not over-complicate things (or make a mountain out of
a molehill) and accept Dan's patch as is.

Kind regards,

  reply	other threads:[~2020-03-10 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07  6:08 Dan Carpenter
2020-03-09  8:40 ` AW: " Walter Harms
2020-03-10  9:06   ` Dan Carpenter
2020-03-10 17:57     ` AW: " Walter Harms
2020-03-10 18:22       ` Tigran Aivazian [this message]
2020-03-09  9:14 ` Tigran Aivazian
2020-03-10  8:38   ` Dan Carpenter

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:

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

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] bfs: prevent underflow in bfs_find_entry()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).