AP_Mission: fix use of uninitialised stack data

loading missions via FTP ends up using uninitialised stack data when storing missions.
This commit is contained in:
Peter Barker 2024-01-23 15:37:37 +11:00 committed by Peter Barker
parent a81f2785aa
commit 475ef8a06d
1 changed files with 2 additions and 0 deletions

View File

@ -988,6 +988,8 @@ MAV_MISSION_RESULT AP_Mission::sanity_check_params(const mavlink_mission_item_in
// return MAV_MISSION_ACCEPTED on success, MAV_MISSION_RESULT error on failure
MAV_MISSION_RESULT AP_Mission::mavlink_int_to_mission_cmd(const mavlink_mission_item_int_t& packet, AP_Mission::Mission_Command& cmd)
{
cmd = {};
// command's position in mission list and mavlink id
cmd.index = packet.seq;
cmd.id = packet.command;