Make sure that the msg.len is in range