$OpenBSD: patch-libcharset_lib_localcharset_c,v 1.3 2009/04/24 18:56:49 naddy Exp $
--- libcharset/lib/localcharset.c.orig	Sun Jan 25 14:04:42 2009
+++ libcharset/lib/localcharset.c	Sun Apr 19 23:47:28 2009
@@ -200,8 +200,9 @@ get_charset_aliases (void)
 		    free (old_res_ptr);
 		  break;
 		}
-	      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
-	      strcpy (res_ptr + res_size - (l2 + 1), buf2);
+	      strlcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1,
+		l1 + 1 + l2 + 1 + 1);
+	      strlcpy (res_ptr + res_size - (l2 + 1), buf2, l2 + 1 + 1);
 	    }
 	  fclose (fp);
 	  if (res_size == 0)
