summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-08-19 08:29:17 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-08-19 08:29:17 +0000
commitc75e7664a2b1793a62b934b06a0938118574ca5c (patch)
treeb015c56673c160339bbb4451fe2d8cadbd1ddefa /usr.bin/tmux
parent0b99079d5eaa03ca2e1c3ade0e20c05b9849fc5e (diff)
Both terminators \007 and \033\\ leave the index pointing to the final
character of the terminator, so correct the size calculation to always add one. GitHub issue 4082.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/tty-keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index 9b0a1d12096..67b7f5844e1 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.175 2024/07/12 11:21:18 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.176 2024/08/19 08:29:16 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1212,7 +1212,7 @@ tty_keys_clipboard(struct tty *tty, const char *buf, size_t len, size_t *size)
}
if (end == len)
return (1);
- *size = end + terminator;
+ *size = end + 1;
/* Skip the initial part. */
buf += 5;