CAN: Fix integer truncation in QCanFrameProcessor bounds check


extractMaxBitNum() computes the end-of-signal bit position as int but
returns quint16, so it truncates. A signal with startBit + bitLength
above 65535 wraps to a value that passes the bounds guard while the
untruncated startBit still drives the memcpy, so a crafted DBC file
makes decoding read past the payload and encoding write past it, both
reporting success. Return qsizetype.

extractValue() and parseAscii() also compared a quint16 loop counter
against a wider bound, so it wrapped and the loop never terminated.
Widen both to qsizetype, matching the big-endian branch.

Patch created with the help of Claude Opus 5, based on a deep-scan that
got concluded on this repository. Verified and corrected by myself.

Fixes: QTBUG-149966
Pick-to: 6.12 6.12.0 6.11 6.11.3 6.10 6.8
Change-Id: I8324788a66f1cdd1e2705caba4b8cb2cb8c509d9
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commitd618c2ef48cbc2cee4a00bd1c296bf8b129c04c6
parent37c2b9752855e188eedc27a844bfc43b327b6eba
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeMon, 14 Sep 2026 13:23:23 +0000