prevent sigsegv in msg_unpack