$OpenBSD$

Fix possible off-by-one buffer overflows by replacing every call of
strcpy, strcat, sprintf by respectively strlcpy, strlcat and snprintf.
 -- 2010-04-16 Thomas de Grivel <billitch@gmail.com>

diff -ruN rxvt-unicode-9.07.orig/src/keyboard.C rxvt-unicode-9.07/src/keyboard.C
--- src/keyboard.C.orig	Sat Dec 26 11:21:21 2009
+++ src/keyboard.C	Thu Apr 15 21:44:28 2010
@@ -335,7 +335,8 @@
 
                   memcpy (buf, prefix + 1, middle - prefix - 1);
                   buf [middle - prefix - 1] = middle [keysym_offset + 1];
-                  strcpy (buf + (middle - prefix), suffix + 1);
+                  strlcpy (buf + (middle - prefix), suffix + 1,
+                           sizeof (buf) - sizeof (char) * (middle - prefix));
 
                   output_string (term, buf);
                 }
