returned length can exceed the limits of type char

Submitted by:	blc@bsdwins.com
Approved by:	gad
MFC after:	1 week
This commit is contained in:
jwd 2003-07-29 00:31:07 +00:00
parent f4b299adc0
commit 03d7e648bd

View File

@ -213,7 +213,7 @@ static char *
concat(const char *str1, const char *str2)
{
char *newstr;
char str1_length = strlen (str1);
int str1_length = strlen (str1);
newstr = malloc (str1_length + strlen (str2) + 1);
if (newstr == 0)