Merge pull request #143 from BeigeBox/fix/stack-overflow-radio-position

Fix stack buffer overflow in DMRNetwork radio position and talker alias writes
This commit is contained in:
Jonathan Naylor 2026-04-05 16:24:52 +01:00 committed by GitHub
commit 3dd99d6952
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,6 +252,9 @@ bool CDMRNetwork::writeRadioPosition(const unsigned char* data, unsigned int len
if (!m_location)
return false;
if (length < 4U || length > 46U)
return false;
unsigned char buffer[50U];
::memcpy(buffer + 0U, "DMRG", 4U);
@ -268,6 +271,9 @@ bool CDMRNetwork::writeTalkerAlias(const unsigned char* data, unsigned int lengt
if (m_status != STATUS::RUNNING)
return false;
if (length < 4U || length > 46U)
return false;
unsigned char buffer[50U];
::memcpy(buffer + 0U, "DMRA", 4U);