use asprintf instead of sprintf
do some OOM checking
we actually have to do this with most xmlrpc functions as well,
but for now we are lazy and just pretend to care about OOM's. ;)