threads / patch / 11978

patcharchive-tar.c: guard config parser from value=NULL

Subject: [PATCH] archive-tar.c: guard config parser from value=NULL

## tl;dr

One message between Feb 9, 2008 and Feb 9, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Govind Salinas· Feb 9, 2008, 00:37 UTC · lore
Signed-off-by: Govind Salinas <blix@sophiasuchtig.com>
---
 archive-tar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to archive-tar.c +1 −1
diff --git a/archive-tar.c b/archive-tar.c
index e1bced5..30aa2e2 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -222,7 +222,7 @@ static void write_global_extended_header(const
unsigned char *sha1)
 static int git_tar_config(const char *var, const char *value)
 {
 	if (!strcmp(var, "tar.umask")) {
-		if (!strcmp(value, "user")) {
+		if (value && !strcmp(value, "user")) {
 			tar_umask = umask(0);
 			umask(tar_umask);
 		} else {
-- 
1.5.4.36.g9af61

← back to recent threads