Use g_strdup_printf() instead of a fixed size buffer.