зеркало из https://github.com/microsoft/git.git
Fix "config_error_nonbool" used with value instead of key
The function "config_error_nonbool", that is defined in "config.c", is used to report an error when a config key in the config file should have a corresponding value but it hasn't. So the parameter to this function should be the key and not the value, because the value is undefined. And it could crash if the value is used. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
9b37322950
Коммит
3ecb171d2b
|
@ -260,7 +260,7 @@ static int git_tag_config(const char *var, const char *value, void *cb)
|
||||||
{
|
{
|
||||||
if (!strcmp(var, "user.signingkey")) {
|
if (!strcmp(var, "user.signingkey")) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return config_error_nonbool(value);
|
return config_error_nonbool(var);
|
||||||
set_signingkey(value);
|
set_signingkey(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче