Skip to content

Commit

Permalink
Fix memcpy overflow, as src and dest are 32 bytes long, only 31 bytes…
Browse files Browse the repository at this point in the history
… has to be copied, not 32, since an offset is applied to src.
  • Loading branch information
f1rmb committed Aug 10, 2023
1 parent de8f991 commit 2c0f08e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DMRTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ bool CDMRTA::decodeTA()

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

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

0 comments on commit 2c0f08e

Please sign in to comment.