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:
parent
f4b299adc0
commit
03d7e648bd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user