mirror of
https://github.com/swaywm/sway.git
synced 2026-03-30 11:10:59 -04:00
Merge pull request #1559 from 4e554c4c/invalid_free
Prevent invalid free of workspace name
This commit is contained in:
commit
c6d54f364f
1 changed files with 3 additions and 2 deletions
|
|
@ -68,8 +68,9 @@ char *workspace_next_name(const char *output_name) {
|
|||
sway_log(L_DEBUG, "Got valid workspace command for target: '%s'", name);
|
||||
char *_target = strdup(name);
|
||||
strip_quotes(_target);
|
||||
while (isspace(*_target))
|
||||
_target++;
|
||||
while (isspace(*_target)) {
|
||||
memmove(_target, _target+1, strlen(_target+1));
|
||||
}
|
||||
|
||||
// Make sure that the command references an actual workspace
|
||||
// not a command about workspaces
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue