Re: [PATCH] remote.c: guard config parser from value=NULL
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.