$OpenBSD: patch-src_install-info_c,v 1.2 2005/11/14 17:09:22 pvalchev Exp $ --- src/install-info.c.orig Thu May 12 15:09:12 2005 +++ src/install-info.c Thu May 12 15:26:28 2005 @@ -166,12 +166,12 @@ concat (s1, s2, s3) char *s1, *s2, *s3; { int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); - char *result = (char *) xmalloc (len1 + len2 + len3 + 1); + int siz=strlen(s1)+strlen(s2)+strlen(s3)+1; + char *result = (char *) xmalloc (siz); - strcpy (result, s1); - strcpy (result + len1, s2); - strcpy (result + len1 + len2, s3); - *(result + len1 + len2 + len3) = 0; + strlcpy (result, s1, siz); + strlcat (result, s2, siz); + strlcat (result, s3, siz); return result; }