From 8567209ada8b13fb96d9a80359b8b60dd0d7c613 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sun, 21 Feb 2021 10:15:15 -0600 Subject: [PATCH] Maintenance: kr_87 overflow prevention --- src/Instrumentation/kr_87.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Instrumentation/kr_87.cxx b/src/Instrumentation/kr_87.cxx index 35ffc9dd1..64833675e 100644 --- a/src/Instrumentation/kr_87.cxx +++ b/src/Instrumentation/kr_87.cxx @@ -402,9 +402,10 @@ void FGKR_87::update( double dt_sec ) { if ( big > 99 ) { big = 99; } - char formatted_timer[128]; + + char formatted_timer[24]; // cout << big << ":" << little << endl; - snprintf(formatted_timer, 6, "%02d:%02d", big, little); + snprintf(formatted_timer, 24, "%02d:%02d", big, little); fgSetString( "/instrumentation/kr-87/outputs/timer-string", formatted_timer );