lkml.org 
[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] exec: load_script: Do not exec truncated interpreter path
On Fri, Feb 15, 2019 at 9:01 AM Kees Cook <keescook@chromium.org> wrote:
>
> The !*first will never hit here (since it's been checked to be either
> ' ' or '\t', and if first == last it's whitespace all the way, so we
> could just return true here to bail out early (there's no interpreter
> at all, so we want to -ENOEXEC still).

Correct.

You do need the !*first test, but it needs to be after the loop
(because the next loop skips over the first non-space thing we found).

Linus

\
 
 \ /
  Last update: 2019-02-15 18:13    [W:0.033 / U:7.156 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site