From d690877117ce1537200d34bb728c874637d0058b Mon Sep 17 00:00:00 2001 From: def Date: Sun, 19 Apr 2015 14:09:40 +0200 Subject: [PATCH] At least don't access invalid memory on server request. Should fix #173 --- src/engine/shared/snapshot.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/shared/snapshot.cpp b/src/engine/shared/snapshot.cpp index d66e089fd..9f62ef77a 100644 --- a/src/engine/shared/snapshot.cpp +++ b/src/engine/shared/snapshot.cpp @@ -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;