From 0f716863889d3d51aea9fadb15d6721442818d7d Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 9 Jan 2023 10:57:21 +0000 Subject: [PATCH] Another sprintf fix in PVE protocol this time --- src/Network/pve.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/pve.cxx b/src/Network/pve.cxx index c78422eb6..9749aee59 100644 --- a/src/Network/pve.cxx +++ b/src/Network/pve.cxx @@ -90,7 +90,7 @@ bool FGPVE::gen_message() { heave_b1 = heave >> 8; heave_b2 = heave & 0x00ff; - sprintf( buf, "p%c%c%c%c%c%c\n", + snprintf( buf, 10, "p%c%c%c%c%c%c\n", roll_b1, roll_b2, pitch_b1, pitch_b2, heave_b1, heave_b2 ); length = 8;