character of the terminator, so correct the size calculation to always
add one. GitHub issue 4082.
-/* $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>
}
if (end == len)
return (1);
- *size = end + terminator;
+ *size = end + 1;
/* Skip the initial part. */
buf += 5;