From 94bb31328279a8ca0c598d08bb62e5831e601264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 15 Jul 2020 17:48:02 +0200 Subject: [PATCH] config: oopsie, need to use strndup() on the pipe command Since it isn't NULL-terminated. --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index 4ed3e2f4..283a72ea 100644 --- a/config.c +++ b/config.c @@ -592,7 +592,7 @@ parse_section_key_bindings( struct config_key_binding_normal binding = { .action = action, .key = strdup(value), - .pipe_cmd = pipe_cmd != NULL ? strdup(pipe_cmd) : NULL, + .pipe_cmd = pipe_cmd != NULL ? strndup(pipe_cmd, pipe_len) : NULL, }; tll_push_back(conf->bindings.key, binding); }