Increase b64_pton buffer to allow for Base64 without padding, from

Michal Majchrowicz.
This commit is contained in:
nicm
2026-04-03 08:23:10 +00:00
parent 483683c197
commit 7497db6e37

View File

@@ -1383,7 +1383,7 @@ tty_keys_clipboard(struct tty *tty, const char *buf, size_t len, size_t *size)
copy[end] = '\0'; copy[end] = '\0';
/* Convert from base64. */ /* Convert from base64. */
needed = (end / 4) * 3; needed = ((end + 3) / 4) * 3;
if (needed == 0) { if (needed == 0) {
free(copy); free(copy);
return (0); return (0);