public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Samuel Dionne-Riel <samuel@dionne-riel.com>,
	Richard Weinberger <richard.weinberger@gmail.com>,
	Graham Christensen <graham@grahamc.com>,
	Michal Hocko <mhocko@suse.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] exec: load_script: Do not exec truncated interpreter path
Date: Fri, 15 Feb 2019 18:08:55 +0100	[thread overview]
Message-ID: <20190215170855.GB8804@redhat.com> (raw)
In-Reply-To: <CAHk-=wjk29MeO9PuyirONZMr75-H6LtfNe6WghOXT7n+f5-RTA@mail.gmail.com>

On 02/15, Linus Torvalds wrote:
>
> +static inline bool tabspc(char c) { return c == ' ' || c == '\t'; }
> +static inline bool no_tab_or_space(const char *first, const char *last)
> +{
> +	// Skip leading space
> +	for (;tabspc(*first) ; first++)
> +		if (!*first || first == last)
                    ^^^^^^^
well, given that tabspc(*first) is true, I don't think that *first == 0
is ever possible ;)

Oleg.


  parent reply	other threads:[~2019-02-15 17:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15  3:17 [PATCH v3] exec: load_script: Do not exec truncated interpreter path Kees Cook
     [not found] ` <CAHk-=wg7DRUqWvbCS2dm=mpdSNJry92Fo0OHDVi67bi8BMqt4A@mail.gmail.com>
2019-02-15  6:14   ` Kees Cook
2019-02-15  6:27     ` Kees Cook
2019-02-15 16:18       ` Oleg Nesterov
2019-02-15 16:28         ` Kees Cook
2019-02-15 16:39         ` Linus Torvalds
2019-02-15 17:01           ` Kees Cook
2019-02-15 17:11             ` Linus Torvalds
2019-02-15 17:08           ` Oleg Nesterov [this message]
2019-02-15 15:54     ` Linus Torvalds
2019-02-15 16:05       ` Linus Torvalds
2019-02-15 16:08         ` Linus Torvalds
2019-02-15 16:08       ` Kees Cook

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=20190215170855.GB8804@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=graham@grahamc.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=richard.weinberger@gmail.com \
    --cc=samuel@dionne-riel.com \
    --cc=torvalds@linux-foundation.org \
    /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