Check for valid message size.
Adapted circular buffer to max message size.