4 ms·
...like returning a pointer to the stack: char *dupstr(const char *src) { char new[1024]; strlcpy(new, src, 1024); return new; }
by rrauenza 8y ago
...like returning a pointer to the stack:
char *dupstr(const char *src) {
char new[1024];
strlcpy(new, src, 1024);
return new;
}