Re: [PATCH v3] exec: load_script: Do not exec truncated interpreter path

From: Oleg Nesterov
Date: Fri Feb 15 2019 - 12:09:03 EST


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.