At least don't access invalid memory on server request. Should fix #173

This commit is contained in:
def 2015-04-19 14:09:40 +02:00
parent 9c1e65a1f5
commit d690877117

View file

@ -341,6 +341,7 @@ int CSnapshotDelta::UnpackDelta(CSnapshot *pFrom, CSnapshot *pTo, void *pSrcData
}
m_SnapshotCurrent = Type;
if(m_SnapshotCurrent < 0 || m_SnapshotCurrent > 0xFFFF) return -3;
if(RangeCheck(pEnd, pData, ItemSize) || ItemSize < 0) return -3;
Key = (Type<<16)|ID;