/* ok, this could be done better but it's only a string ;-) */ ret = (char*) malloc(strlen(str) + strlen(str)); #### ret = (char*) malloc(strlen(str) * 2); #### pret += 7;
## ret = (char*) malloc(strlen(str) * 2); ##
## pret += 7;