Use asprintf instead of static buffers

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>