@matheusbsbs / matheus-bagliano / commits / 3ecb171d2b
Fork 0

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>

Christian Couder committed Jul 6, 2008 at 06:10 UTC 3ecb171d2b9aca7b09bf112594977d00925893b4
1 file changed +1 -1
builtin-tag.c
+1 -1
@@ -260,7 +260,7 @@ static int git_tag_config(const char *var, const char *value, void *cb)
260 {
261 if (!strcmp(var, "user.signingkey")) {
262 if (!value)
263 - return config_error_nonbool(value);
263 + return config_error_nonbool(var);
264 set_signingkey(value);
265 return 0;
266 }