Re: [PATCH] config_set_multivar(): disallow newlines in keys
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Jan 22, 2007, 15:06 UTC
- Message-ID
- <81b0412b0701220706w65ed0657h1d69819e7879ed40@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.63.0701200224180.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On 1/20/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 8 quoted lines
> --- a/config.c
> +++ b/config.c
> @@ -661,6 +661,11 @@ int git_config_set_multivar(const char* key, const char* value,
> goto out_free;
> }
> c = tolower(c);
> + } else if (c == '\n') {
> + fprintf(stderr, "invalid key (newline): %s\n", key);BTW, why config.c never uses error() or warn()?