git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] commit.c: guard config parser from value=NULL
@ 2008-02-09 20:16 Govind Salinas
  2008-02-10  2:57 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Govind Salinas @ 2008-02-09 20:16 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: Govind Salinas <blix@sophiasuchtig.com>
---
 config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config.c b/config.c
index 498259e..8247e88 100644
--- a/config.c
+++ b/config.c
@@ -407,12 +407,12 @@ int git_default_config(const char *var, const char *value)
 		return 0;
 	}

-	if (!strcmp(var, "user.name")) {
+	if (value && !strcmp(var, "user.name")) {
 		strlcpy(git_default_name, value, sizeof(git_default_name));
 		return 0;
 	}

-	if (!strcmp(var, "user.email")) {
+	if (value && !strcmp(var, "user.email")) {
 		strlcpy(git_default_email, value, sizeof(git_default_email));
 		return 0;
 	}
-- 
1.5.4.36.g9af61

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-10  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-09 20:16 [PATCH] commit.c: guard config parser from value=NULL Govind Salinas
2008-02-10  2:57 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).