DORMANTno replies

[PATCH] commit.c: guard config parser from value=NULL

From: Govind Salinas <hidden>
Date: 2016-06-15 22:44:12
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Govind Salinas <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help