Skip to content

Commit

Permalink
Fix "config_error_nonbool" used with value instead of key
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Jul 6, 2008
1 parent 9b37322 commit 3ecb171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int git_tag_config(const char *var, const char *value, void *cb)
{
if (!strcmp(var, "user.signingkey")) {
if (!value)
return config_error_nonbool(value);
return config_error_nonbool(var);
set_signingkey(value);
return 0;
}
Expand Down

0 comments on commit 3ecb171

Please sign in to comment.