diff options
author | nicm <nicm> | 2022-02-15 13:03:02 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-02-15 13:03:02 +0000 |
commit | f85208602ddd43ba55f29beae8d7a05cbfedefc1 (patch) | |
tree | 6394e8fd3b86e1089560b0dd73386c5df9be469f /tty-keys.c | |
parent | 040164555a0e41d23082b74a2a22ff370e8193c2 (diff) | |
download | rtmux-f85208602ddd43ba55f29beae8d7a05cbfedefc1.tar.gz rtmux-f85208602ddd43ba55f29beae8d7a05cbfedefc1.tar.bz2 rtmux-f85208602ddd43ba55f29beae8d7a05cbfedefc1.zip |
Do not create a buffer from an OSC 52 response if we have not sent a
query.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1217,6 +1217,11 @@ tty_keys_clipboard(__unused struct tty *tty, const char *buf, size_t len, buf++; end--; + /* If we did not request this, ignore it. */ + if (~tty->flags & TTY_OSC52QUERY) + return (0); + tty->flags &= ~TTY_OSC52QUERY; + /* It has to be a string so copy it. */ copy = xmalloc(end + 1); memcpy(copy, buf, end); |