FrameSender: fix memory corruption while writing to the QCanBusFrame with empty payload
This commit is contained in:
@@ -851,7 +851,7 @@ void FlowViewWindow::updatePosition(bool forward)
|
||||
int maxVal = qMin(chunk * 8 + 8, frameCache.at(currentPosition).payload().length());
|
||||
for (int i = chunk * 8; i < maxVal; i++)
|
||||
{
|
||||
unsigned char thisByte = static_cast<unsigned char>(frameCache.at(currentPosition).payload().data()[i]);
|
||||
unsigned char thisByte = static_cast<unsigned char>(frameCache.at(currentPosition).payload()[i]);
|
||||
cngByte = currBytes[i] ^ thisByte;
|
||||
changedBits |= (uint64_t)cngByte << (8ull * (i & 7));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user