rework "replace malloc(strlen())/strlcpy with strdup"