aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-11-21 14:05:38 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-11-28 14:14:55 +0000
commitce8ea2db66db0f81312df8fc993aa47d200a1305 (patch)
treea8082b2342f37158fbf36305f63234d2e03f1aec
parentcsi: kitty: remove unneeded xasserts (diff)
input: legacy: reduce size of reply buffer
Its maximum size is known; the only two variables are two integers. We know the maximum length of an integer converted to a string.
-rw-r--r--input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input.c b/input.c
index 773c6c0c..9d4efe34 100644
--- a/input.c
+++ b/input.c
@@ -1083,7 +1083,7 @@ legacy_kbd_protocol(struct seat *seat, struct terminal *term,
int modify_param = mod_param_map[keymap_mods];
xassert(modify_param != 0);
- char reply[1024];
+ char reply[32];
size_t n = xsnprintf(reply, sizeof(reply), "\x1b[27;%d;%d~", modify_param, sym);
term_to_slave(term, reply, n);
}