CVE-2013-4408:async_sock: add some overflow detection to read_packet_handler()