From 4ba9b3ec34d3bd2525e2e0920d760bddf750f102 Mon Sep 17 00:00:00 2001 From: vk7js <58905135+vk7js@users.noreply.github.com> Date: Tue, 13 Sep 2022 21:13:54 +1000 Subject: [PATCH] Fixed memory overrun caused by buffer being too small. Also fixed satellite count which got broken when I changed the GPS info flags to add more. --- openrtx/include/core/voicePrompts.h | 2 +- openrtx/src/core/voicePromptUtils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openrtx/include/core/voicePrompts.h b/openrtx/include/core/voicePrompts.h index ba95b733..31c2b7cd 100644 --- a/openrtx/include/core/voicePrompts.h +++ b/openrtx/include/core/voicePrompts.h @@ -254,7 +254,7 @@ typedef enum vpGPSAltitude = 0x40, vpGPSDirection = 0x80, vpGPSSatCount = 0x100, - vpGPSAll = 0xff, + vpGPSAll = 0x1ff, } vpGPSInfoFlags_t; diff --git a/openrtx/src/core/voicePromptUtils.c b/openrtx/src/core/voicePromptUtils.c index df783e81..7bf1a9e8 100644 --- a/openrtx/src/core/voicePromptUtils.c +++ b/openrtx/src/core/voicePromptUtils.c @@ -595,7 +595,7 @@ void vp_announceGPSInfo(vpGPSInfoFlags_t gpsInfoFlags) addSilenceIfNeeded(flags); } - char buffer[16] = "\0"; + char buffer[17] = "\0"; if (gpsInfoFlags & vpGPSSpeed) {