git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
GSGovind Salinas <blix@sophiasuchtig.com>
Date
Feb 9, 2008, 00:37 UTC
Message-ID
<5d46db230802081637i3197b923ka0b779cf582031e3@mail.gmail.com>
Signed-off-by: Govind Salinas <blix@sophiasuchtig.com>
---
 archive-tar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
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
Message 1 of 1 in “archive-tar.c: guard config parser from value=NULL”
  1. archive-tar.c: guard config parser from value=NULLGovind Salinas, Feb 9, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.