5 #include <security/pam_misc.h>
8 * Safe duplication of character strings. "Paranoid"; don't leave
9 * evidence of old token around for later stack analysis.
12 char *xstrdup(const char *x)
14 register char *new=NULL;
19 for (i=0; x[i]; ++i); /* length of string */
20 if ((new = malloc(++i)) == NULL) {
30 return new; /* return the duplicate or NULL on error */