This commit is contained in:
jl777
2019-03-25 10:11:31 -11:00
parent a19b854238
commit 09589bd0e0

View File

@@ -1861,7 +1861,7 @@ long _stripwhite(char *buf,int accept)
char *clonestr(char *str)
{
char *clone;
char *clone; int32_t len;
if ( str == 0 || str[0] == 0 )
{
printf("warning cloning nullstr.%p\n",str);
@@ -1870,7 +1870,8 @@ char *clonestr(char *str)
#endif
str = (char *)"<nullstr>";
}
clone = (char *)malloc(strlen(str)+16);
len = strlen(str);
clone = (char *)malloc(len+16);
strcpy(clone,str);
return(clone);
}