Is this safe? You are returning a pointer to a local buffer.