MAVLink commands, causing memory access violation and integer overflow

Dear all,

While I tested some MAVLink commands on SITL, I noticed that some memory access violation and integer overflow issues. Just in case, I would like to leave the issues in here!

209 (MAV_CMD_DO_MOTOR_TEST) and 42429 (MAV_CMD_ACCELCAL_VEHICLE_POS) leads to memory access violations.

The figure in the below shows the case of MAV_CMD_DO_MOTOR_TEST.

The figure in the below represents the case of MAV_CMD_ACCELCAL_VEHICLE_POS.


I guess that I need to test these commands on a real hardware instead of SITL.

Plus, I found some integer overflow issues: CMD number 22, 179, 195, and 201.


Thanks!

Thanks for the reports!

I’ve created a pair of PRs to fix the segfaults.

The integer overflows I’m less inclined to delve into - problem with validating parameters to a T is that we end up with fewer features in ArduPilot. Are there any you’ve found which are of particular concern?

1 Like

@peterbarker
Thank you! I just checked the PRs.
Regarding the integer overflows, yes, I agree with you. The integer overflows will not occur in normal operations. The reason is that only weird position values (latitude and longitude) lead to the integer overflows.