CAN: Clamp vendor CAN receive payload lengths


Clamp driver lengths to the 8-byte payload arrays in the PeakCAN,
Systec, TinyCAN, and VectorCAN classic CAN receive paths. In the
CAN FD receive paths, interpret classic frames' DLC as at most 8
bytes and skip invalid DLC values. Also bound VectorCAN's CAN FD
copy to its 64-byte array. This avoids reading adjacent driver
data and emitting oversized classic CAN frames.

[ChangeLog][CAN][CAN Plugins] Received classic CAN payloads are
limited to 8 bytes, including on CAN FD-enabled channels.

Pick-to: 6.12 6.8
Fixes: QTBUG-149974
Assisted-by: OpenAI Codex
Change-Id: I30c1814952900f51a0b87eaa597c891ed8262db7
Reviewed-by: Stefan Steinwasser <stefan-qt@kcxh6.de>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit73371bf57b090941494fd36739fdfb0a3e7d6df3
parent69eaad3a4170f0345cccd2893bac6d2af9bdeafc
authorAndre Hartmann <aha_1980@gmx.de>
committerAndre Hartmann <aha_1980@gmx.de>
commit timeFri, 2 Oct 2026 10:28:11 +0000