[PATCH 6.4 040/227] accel/qaic: tighten bounds checking in encode_message()