aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-15 15:48:02 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-15 15:48:02 +0000
commit94bb31328279a8ca0c598d08bb62e5831e601264 (patch)
tree9869bbf8796debb319c968c7a47a155951d9e6d9
parentconfig: change syntax for pipe-command in key binding (diff)
config: oopsie, need to use strndup() on the pipe command
Since it isn't NULL-terminated.
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
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);
}