Use buffer size for b64_pton, from someone in GitHub issue 4882.

This commit is contained in:
nicm
2026-02-23 09:08:07 +00:00
parent 0dc1b5adfb
commit 0cc4f0fd76

View File

@@ -1389,7 +1389,7 @@ tty_keys_clipboard(struct tty *tty, const char *buf, size_t len, size_t *size)
return (0);
}
out = xmalloc(needed);
if ((outlen = b64_pton(copy, out, len)) == -1) {
if ((outlen = b64_pton(copy, out, needed)) == -1) {
free(out);
free(copy);
return (0);