$OpenBSD: patch-gettext-runtime_intl_localcharset_c,v 1.2 2010/07/03 03:23:22 naddy Exp $ --- gettext-runtime/intl/localcharset.c.orig Mon Jun 28 20:25:43 2010 +++ gettext-runtime/intl/localcharset.c Mon Jun 28 20:27:53 2010 @@ -233,8 +233,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)