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

Re: [PATCH] remote.c: guard config parser from value=NULL

From
Michele Ballabio <barra_cuda@katamail.com>
Date
Feb 8, 2008, 16:34 UTC
Message-ID
<200802081734.37715.barra_cuda@katamail.com>
In-Reply-To
<20080208142640.GX25954@genesis.frugalware.org>
On Friday 08 February 2008, Miklos Vajna wrote:
Show 18 quoted lines
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>  remote.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/remote.c b/remote.c
> index 0e00680..4765815 100644
> --- a/remote.c
> +++ b/remote.c
> @@ -276,7 +276,7 @@ static int handle_config(const char *key, const char *value)
>  		else
>  			error("more than one uploadpack given, using the first");
>  	} else if (!strcmp(subkey, ".tagopt")) {
> -		if (!strcmp(value, "--no-tags"))
> +		if (value && !strcmp(value, "--no-tags"))
>  			remote->fetch_tags = -1;
>  	} else if (!strcmp(subkey, ".proxy")) {
>  		remote->http_proxy = xstrdup(value);
Function handle_config() has already returned 0 at this point.
Previous: Miklos VajnaNext: Miklos Vajna
Message 5 of 15 in “[Janitors] value could be NULL in config parser”
  1. Junio C HamanoFeb 8, 2008
  2. archive-tar.c: guard config parser from value=NULLMiklos Vajna, Feb 8, 2008
  3. builtin-gc.c: guard config parser from value=NULLMiklos Vajna, Feb 8, 2008
  4. remote.c: guard config parser from value=NULLMiklos Vajna, Feb 8, 2008
  5. Michele BallabioFeb 8, 2008
  6. setup.c: guard config parser from value=NULLMiklos Vajna, Feb 8, 2008
  7. Michele BallabioFeb 8, 2008
  8. Miklos VajnaFeb 8, 2008
  9. Govind SalinasFeb 8, 2008
  10. Govind SalinasFeb 9, 2008
  11. Christian CouderFeb 9, 2008
  12. Junio C HamanoFeb 9, 2008
  13. Christian CouderFeb 9, 2008
  14. Christian CouderFeb 9, 2008
  15. Govind SalinasFeb 9, 2008

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.