- /* Sanity checks */
- if (silc_unlikely(packetlen < SILC_PACKET_MIN_LEN)) {
- if (!stream->udp && !silc_socket_stream_is_udp(stream->stream, NULL))
- SILC_LOG_ERROR(("Received too short packet"));
- silc_mutex_unlock(stream->lock);
- SILC_PACKET_CALLBACK_ERROR(stream, SILC_PACKET_ERR_MALFORMED);
- silc_mutex_lock(stream->lock);
- memset(tmp, 0, sizeof(tmp));
- goto out;
- }
-