From 7c674daeaf5753748fe249e749d12a7f27b23f5e Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Sun, 17 Dec 2023 22:18:50 -0500 Subject: [PATCH] fix buffer overflow for certain unsupported configurations (the log message was irritating me so I fixed this); --- src/p25/Control.cpp | 2 +- src/p25/packet/ControlSignaling.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p25/Control.cpp b/src/p25/Control.cpp index ceb31fb3..85297ed9 100644 --- a/src/p25/Control.cpp +++ b/src/p25/Control.cpp @@ -1129,7 +1129,7 @@ void Control::addFrame(const uint8_t* data, uint32_t length, bool net, bool imm) return; } - // resize immediate queue if necessary (this shouldn't really ever happen) + // resize queue if necessary (this shouldn't really ever happen) uint32_t space = m_txQueue.freeSpace(); if (space < (length + 1U)) { if (!net) { diff --git a/src/p25/packet/ControlSignaling.cpp b/src/p25/packet/ControlSignaling.cpp index 4c228e06..c6564b2c 100644 --- a/src/p25/packet/ControlSignaling.cpp +++ b/src/p25/packet/ControlSignaling.cpp @@ -1744,7 +1744,7 @@ void ControlSignaling::writeRF_TDULC_ChanRelease(bool grp, uint32_t srcId, uint3 } uint32_t count = m_p25->m_hangCount / 2; - if (!m_p25->m_dedicatedControl) { + if (!m_p25->m_dedicatedControl || m_p25->m_voiceOnControl) { count = count / 2; } std::unique_ptr lc = nullptr;