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
aae962d56e
commit
74e35006ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118136
@ -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