mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
At least don't access invalid memory on server request. Should fix #173
This commit is contained in:
parent
9c1e65a1f5
commit
d690877117
|
@ -341,6 +341,7 @@ int CSnapshotDelta::UnpackDelta(CSnapshot *pFrom, CSnapshot *pTo, void *pSrcData
|
||||||
}
|
}
|
||||||
m_SnapshotCurrent = Type;
|
m_SnapshotCurrent = Type;
|
||||||
|
|
||||||
|
if(m_SnapshotCurrent < 0 || m_SnapshotCurrent > 0xFFFF) return -3;
|
||||||
if(RangeCheck(pEnd, pData, ItemSize) || ItemSize < 0) return -3;
|
if(RangeCheck(pEnd, pData, ItemSize) || ItemSize < 0) return -3;
|
||||||
|
|
||||||
Key = (Type<<16)|ID;
|
Key = (Type<<16)|ID;
|
||||||
|
|
Loading…
Reference in a new issue