Fix bug where friendreq_handlepacket did not do bounds checking