replace malloc(strlen())/strlcpy with strdup

ok beck@ jsing@