git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix filename verification when in a subdirectory

From
THTimo 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/
Previous: Linus TorvaldsNext: Linus Torvalds
Message 7 of 8 in “lstat() call in rev-parse.c”
  1. Paul MackerrasApr 23, 2006
  2. Linus TorvaldsApr 23, 2006
  3. Paul MackerrasApr 24, 2006
  4. Matthias LederhoferApr 26, 2006
  5. Linus TorvaldsApr 26, 2006
  6. Fix filename verification when in a subdirectoryLinus Torvalds, Apr 26, 2006
  7. Timo HirvonenApr 26, 2006
  8. Linus TorvaldsApr 26, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.