about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cgit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index afafcce..d145f8a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -401,9 +401,9 @@ static void prepare_context(struct cgit_context *ctx)
 	ctx->page.etag = NULL;
 	memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list));
 	if (ctx->env.script_name)
-		ctx->cfg.script_name = ctx->env.script_name;
+		ctx->cfg.script_name = xstrdup(ctx->env.script_name);
 	if (ctx->env.query_string)
-		ctx->qry.raw = ctx->env.query_string;
+		ctx->qry.raw = xstrdup(ctx->env.query_string);
 	if (!ctx->env.cgit_config)
 		ctx->env.cgit_config = CGIT_CONFIG;
 }
>June McEnroe 2019-02-08Use set for parent in hiJune McEnroe 2019-02-08Switch back to semantic keyword grouping in hiJune McEnroe 2019-02-08Match only the basename in hiJune McEnroe 2019-02-07Add mdoc syntax to hiJune McEnroe 2019-02-07Support multi-line C macros in hiJune McEnroe 2019-02-07Detect .mk files as makeJune McEnroe 2019-02-07Add make syntax to hiJune McEnroe 2019-02-07Add IRC output to hiJune McEnroe 2019-02-07Improve C syntax accuracy and add Format classJune McEnroe 2019-02-07Factor out hi checkJune McEnroe Fix subexpression bounds check and compile pattends. 2019-02-07Add Escape class to hiJune McEnroe 2019-02-07Add Todo class and parent syntax constraintJune McEnroe