Skip to content

Commit

Permalink
iop parsing: make the PictureObject data size check less restricitve
Browse files Browse the repository at this point in the history
I came across an implement (Kverneland Andex1304) which contains a
PictureGraphics with 0x0 actual size and 0 raw data size.
Later it contains the same PictureGraphics object with correct
dimensions, but the parser bailed out on the first zero size.
  • Loading branch information
martonmiklos committed Jan 8, 2025
1 parent bbac440 commit f2ff899
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions isobus/src/isobus_virtual_terminal_working_set_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2294,9 +2294,7 @@ namespace isobus
CANStackLogger::warn("[WS]: Skipped parsing macro reference in picture graphic object (todo)");
}

if ((0 != tempObject->get_actual_width()) &&
(0 != tempObject->get_actual_height()) &&
(tempObject->get_raw_data().size() == (tempObject->get_actual_width() * tempObject->get_actual_height())))
if (tempObject->get_raw_data().size() != (tempObject->get_actual_width() * tempObject->get_actual_height()))
{
retVal = true;
}
Expand Down

0 comments on commit f2ff899

Please sign in to comment.