use snprintf, strdup, ... where possible to make for safer operation -- Martin Pelikan