summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index eff5b7a..4f2c752 100644
--- a/cgit.c
+++ b/cgit.c
@@ -2,4 +2,5 @@
2 * 2 *
3 * Copyright (C) 2006 Lars Hjemli 3 * Copyright (C) 2006 Lars Hjemli
4 * Copyright (C) 2010 Jason A. Donenfeld <Jason@zx2c4.com>
4 * 5 *
5 * Licensed under GNU General Public License v2 6 * Licensed under GNU General Public License v2
@@ -72,5 +73,6 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
72 repo->section = xstrdup(value); 73 repo->section = xstrdup(value);
73 else if (!strcmp(name, "readme") && value != NULL) { 74 else if (!strcmp(name, "readme") && value != NULL) {
74 if (*value == '/') 75 char *colon;
76 if (*value == '/' || ((colon = strchr(value, ':')) != NULL && colon != value && *(colon + 1) != '\0'))
75 repo->readme = xstrdup(value); 77 repo->readme = xstrdup(value);
76 else 78 else