1. there is no need to cast malloc
http://faq.cprogramming.com/cgi-bin/...&id=1043284351

2. What do you mean by blows up?