mirror of
https://github.com/ShaYmez/xlxd.git
synced 2024-11-15 20:51:51 -05:00
Fix 1 byte buffer overflow in AMBE handling
This commit is contained in:
parent
73516e9f14
commit
1ffcee24ca
@ -739,7 +739,7 @@ bool CDmrmmdvmProtocol::IsValidDvFramePacket(const CBuffer &Buffer, CDvFramePack
|
||||
memcpy(dmr3ambe, dmrframe, 14);
|
||||
dmr3ambe[13] &= 0xF0;
|
||||
dmr3ambe[13] |= (dmrframe[19] & 0x0F);
|
||||
memcpy(&dmr3ambe[14], &dmrframe[20], 14);
|
||||
memcpy(&dmr3ambe[14], &dmrframe[20], 13);
|
||||
// extract sync
|
||||
dmrsync[0] = dmrframe[13] & 0x0F;
|
||||
::memcpy(&dmrsync[1], &dmrframe[14], 5);
|
||||
|
@ -521,7 +521,7 @@ bool CDmrplusProtocol::IsValidDvFramePacket(const CIp &Ip, const CBuffer &Buffer
|
||||
memcpy(dmr3ambe, dmrframe, 14);
|
||||
dmr3ambe[13] &= 0xF0;
|
||||
dmr3ambe[13] |= (dmrframe[19] & 0x0F);
|
||||
memcpy(&dmr3ambe[14], &dmrframe[20], 14);
|
||||
memcpy(&dmr3ambe[14], &dmrframe[20], 13);
|
||||
// extract sync
|
||||
dmrsync[0] = dmrframe[13] & 0x0F;
|
||||
::memcpy(&dmrsync[1], &dmrframe[14], 5);
|
||||
|
Loading…
Reference in New Issue
Block a user