diff options
author | Thomas Adam <thomas@xteddy.org> | 2021-10-21 12:01:10 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2021-10-21 12:01:10 +0100 |
commit | be2413292f6e94aca0a5c707254db62a2b186f84 (patch) | |
tree | 2739127739d5dba9b10a4e7aec3c423bae683c0b | |
parent | 1bf2f811ea8835dd24bdb773b5be4df517767d1f (diff) | |
parent | 289ac55ebde18df237ad21734ba4056896d11022 (diff) |
Merge branch 'obsd-master' into master
-rw-r--r-- | cmd-show-options.c | 6 | ||||
-rw-r--r-- | tty-keys.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c index 0e973ea0..90226ad3 100644 --- a/cmd-show-options.c +++ b/cmd-show-options.c @@ -126,6 +126,12 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item) parent = 0; if (o != NULL) cmd_show_options_print(self, item, o, idx, parent); + else if (*name == '@') { + if (args_has(args, 'q')) + goto fail; + cmdq_error(item, "invalid option: %s", argument); + goto fail; + } free(name); free(argument); @@ -1204,6 +1204,9 @@ tty_keys_clipboard(__unused struct tty *tty, const char *buf, size_t len, buf += 5; end -= 5; + /* Adjust end so that it points to the start of the terminator. */ + end -= terminator - 1; + /* Get the second argument. */ while (end != 0 && *buf != ';') { buf++; |