Skip to content

Commit

Permalink
Fix for a potential crash when a message has 0 data bytes set as its
Browse files Browse the repository at this point in the history
payload length
  • Loading branch information
collin80 committed Dec 28, 2022
1 parent 48ce280 commit 32f0d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion candatagrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void CANDataGrid::paintGridCells()
if ((usedData[byteIdx] & (1 << bitIdx)) == (1 << bitIdx))
{
usedSigNum = getUsedSignalNum(bit);
if (prevSigName != signalNames[usedSigNum])
if ((usedSigNum > -1) && (prevSigName != signalNames[usedSigNum]) )
{
prevSigName = signalNames[usedSigNum];

Expand Down

0 comments on commit 32f0d11

Please sign in to comment.