Re: [PATCH] Fix filename verification when in a subdirectory
- From
- Timo Hirvonen <tihirvon@gmail.com>
- Date
- Apr 26, 2006, 18:05 UTC
- Message-ID
- <20060426210541.5e145e88.tihirvon@gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0604261010390.3701@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
Show 11 quoted lines
> +void verify_filename(const char *prefix, const char *arg)
> +{
> + const char *name;
> + struct stat st;
> +
> + if (*arg == '-')
> + die("bad flag '%s' used after filename", arg);
> + name = prefix ? prefix_filename(prefix, strlen(prefix), arg) : arg;
> + if (!lstat(name, &st))
> + return;
> + if (errno == ENOENT);Extra semicolon.
-- http://onion.dynserv.net/~timo/