mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 22:18:19 +00:00
Fix off-by-one error when adding raw data to buffer
One byte too few could be added to packers as raw data. Detected by the new test cases.
This commit is contained in:
parent
8794cc9f9c
commit
c5e336f5e2
|
@ -66,7 +66,7 @@ void CPacker::AddRaw(const void *pData, int Size)
|
||||||
if(m_Error)
|
if(m_Error)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_pCurrent + Size >= m_pEnd)
|
if(m_pCurrent + Size > m_pEnd)
|
||||||
{
|
{
|
||||||
m_Error = true;
|
m_Error = true;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue