Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'credential.c')
-rw-r--r--credential.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/credential.c b/credential.c
index 9747f47b18..00ee4d62db 100644
--- a/credential.c
+++ b/credential.c
@@ -194,6 +194,8 @@ static void credential_write_item(FILE *fp, const char *key, const char *value)
{
if (!value)
return;
+ if (strchr(value, '\n'))
+ die("credential value for %s contains newline", key);
fprintf(fp, "%s=%s\n", key, value);
}