Removed deprecated function from public api.

Added upper length check to friendreq_handlepacket().