diff options
author | emersion <contact@emersion.fr> | 2018-06-08 08:55:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 08:55:29 +0100 |
commit | bf6ca69ae8c1149e6b6ae84f5ddc40639d1ff5a1 (patch) | |
tree | 19c1eb89136d7c96aa7a61703e362fba2fd1fa1d | |
parent | 07bee8cffe60b4a23ddd637461d8290f25f99be2 (diff) | |
parent | 212e4ef39518c4bb29eeef46f705770d3d28a6fc (diff) |
Merge pull request #2118 from RedSoxFan/fix-2117
Remove strip quoting and fix strncpy-overlap
-rw-r--r-- | sway/commands.c | 1 | ||||
-rw-r--r-- | sway/config.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/sway/commands.c b/sway/commands.c index 464c9932..1523fdd1 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -274,7 +274,6 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) { for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) { argv[i] = do_var_replacement(argv[i]); unescape_string(argv[i]); - strip_quotes(argv[i]); } if (!config->handler_context.using_criteria) { diff --git a/sway/config.c b/sway/config.c index 0e41df04..949c5cd3 100644 --- a/sway/config.c +++ b/sway/config.c @@ -660,7 +660,7 @@ char *do_var_replacement(char *str) { // Unescape double $ and move on if (find[1] == '$') { size_t length = strlen(find + 1); - strncpy(find, find + 1, length); + memmove(find, find + 1, length); find[length] = '\0'; ++find; continue; |