1
0
mirror of https://github.com/openbsd/src.git synced 2026-05-01 17:46:35 +00:00

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 0ed3ac6729
commit 9750c304bb

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tty-keys.c,v 1.202 2026/02/18 09:10:31 nicm Exp $ */
/* $OpenBSD: tty-keys.c,v 1.203 2026/02/23 09:08:07 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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);