Skip to content

Commit

Permalink
[core] fix CSndBuffer parameter incorrect in AES GCM mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ppiao authored and maxsharabayko committed Nov 16, 2022
1 parent fa8c58a commit 432f2d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5509,7 +5509,8 @@ bool srt::CUDT::prepareConnectionObjects(const CHandShake &hs, HandshakeSide hsd

try
{
m_pSndBuffer = new CSndBuffer(32, m_iMaxSRTPayloadSize);
const int authtag = m_config.iCryptoMode == CSrtConfig::CIPHER_MODE_AES_GCM ? HAICRYPT_AUTHTAG_MAX : 0;
m_pSndBuffer = new CSndBuffer(32, m_iMaxSRTPayloadSize, authtag);
SRT_ASSERT(m_iISN != -1);
m_pRcvBuffer = new srt::CRcvBuffer(m_iISN, m_config.iRcvBufSize, m_pRcvQueue->m_pUnitQueue, m_config.bMessageAPI);
// after introducing lite ACK, the sndlosslist may not be cleared in time, so it requires twice space.
Expand Down

0 comments on commit 432f2d8

Please sign in to comment.