From 7e41874d8f4a19aea900037c6c16f32a62efbd63 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Jul 2020 13:14:35 +1000 Subject: [PATCH] AP_RCTelemetry: use strncpy_noterm --- libraries/AP_RCTelemetry/AP_RCTelemetry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_RCTelemetry/AP_RCTelemetry.cpp b/libraries/AP_RCTelemetry/AP_RCTelemetry.cpp index 2316ab7794..f0fb270300 100644 --- a/libraries/AP_RCTelemetry/AP_RCTelemetry.cpp +++ b/libraries/AP_RCTelemetry/AP_RCTelemetry.cpp @@ -147,7 +147,7 @@ void AP_RCTelemetry::queue_message(MAV_SEVERITY severity, const char *text) mavlink_statustext_t statustext{}; statustext.severity = severity; - strncpy(statustext.text, text, sizeof(statustext.text)); + strncpy_noterm(statustext.text, text, sizeof(statustext.text)); // The force push will ensure comm links do not block other comm links forever if they fail. // If we push to a full buffer then we overwrite the oldest entry, effectively removing the