Make sure we don't try to strlen some empty space or neighbouring
segments, that may or may not contain nulls
Also tweak the function to warn about large messages, since it is not
(yet) clear whether we actually want those. At least something to log.