From 9f47e6763053ab383f27819dff75aefc68c3e6c1 Mon Sep 17 00:00:00 2001 From: g4eml Date: Sun, 1 Jan 2017 14:22:49 +0000 Subject: [PATCH] Fix crash in DMR DMO Mode Modem was crashing on Teensy when running in DMO mode. Crashed as soon as Tx started. Traced to exceeding the bounds of m_poBuffer during the txdelay phase. m_poBuffer was dimensioned to 80 but m_txdelay could be 600 to 1200 so a massive overwrite was happening. Surprisingly this didn't crash on the Due only on the Teensy. --- DMRDMOTX.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DMRDMOTX.h b/DMRDMOTX.h index 3650d0d..d904ca6 100644 --- a/DMRDMOTX.h +++ b/DMRDMOTX.h @@ -41,7 +41,7 @@ private: CSerialRB m_fifo; arm_fir_instance_q15 m_modFilter; q15_t m_modState[70U]; // NoTaps + BlockSize - 1, 42 + 20 - 1 plus some spare - uint8_t m_poBuffer[80U]; + uint8_t m_poBuffer[1200U]; uint16_t m_poLen; uint16_t m_poPtr; uint16_t m_txDelay;