Fix an infinite loop in receive buffer size calculation.
Don't use LO_MAX_MSG_SIZE when validating blobs.

Simply compare with buffer size instead.
Check outgoing message size only for UDP protocol.