Skip to content

Commit 2c0f08e

Browse files
committed
Fix memcpy overflow, as src and dest are 32 bytes long, only 31 bytes has to be copied, not 32, since an offset is applied to src.
1 parent de8f991 commit 2c0f08e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DMRTA.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ bool CDMRTA::decodeTA()
9898

9999
case 1U: // ISO 8 bit
100100
case 2U: // UTF8
101-
::memcpy(m_ta, m_buf + 1U, sizeof(m_ta));
101+
::memcpy(m_ta, m_buf + 1U, sizeof(m_ta) - 1);
102102
break;
103103

104104
case 3U: { // UTF16 poor man's conversion

0 commit comments

Comments
 (0)