Use asprintf() instead of snprintf()