From 59f4d614f01e3788b668b824dd7ce93a35e18985 Mon Sep 17 00:00:00 2001 From: Arthur Lambert Date: Thu, 29 Oct 2020 17:39:39 +0100 Subject: [PATCH] Fix segfault in TelemetryImpl::process_actuator_output_status : accessing uninitialized element --- src/plugins/telemetry/telemetry_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/telemetry/telemetry_impl.cpp b/src/plugins/telemetry/telemetry_impl.cpp index 80c05a9f08..67d3c2ac90 100644 --- a/src/plugins/telemetry/telemetry_impl.cpp +++ b/src/plugins/telemetry/telemetry_impl.cpp @@ -1078,7 +1078,7 @@ void TelemetryImpl::process_actuator_output_status(const mavlink_message_t& mess const unsigned actuators_size = sizeof(status.actuator) / sizeof(status.actuator[0]); // Can't use std::copy because status is packed. for (std::size_t i = 0; i < actuators_size; ++i) { - actuators[i] = status.actuator[i]; + actuators.push_back(status.actuator[i]); } set_actuator_output_status(active, actuators);