Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
“penghaoze committed Oct 17, 2019
1 parent 4500199 commit 6fc51b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xop/RtmpConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int RtmpConnection::parseChunkHeader(BufferReader& buffer)
{
return 0;
}
bytesUsed += buf[bytesUsed + 1] * 255 + buf[bytesUsed] + 64;
csid += buf[bytesUsed + 1] * 255 + buf[bytesUsed] + 64;
bytesUsed += 2;
}

Expand Down Expand Up @@ -380,7 +380,7 @@ int RtmpConnection::parseChunkBody(BufferReader& buffer)
uint32_t chunkSize = rtmpMsg.length - rtmpMsg.index;
if (chunkSize > m_inChunkSize)
chunkSize = m_inChunkSize;
if ((bufSize - bytesUsed) < chunkSize)
if (bufSize < (chunkSize + bytesUsed))
{
return 0;
}
Expand Down

0 comments on commit 6fc51b4

Please sign in to comment.