From 3b88d78736eb886f14d7f9fd168153186568f99c Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Sat, 27 May 2017 15:52:05 +0200 Subject: [PATCH] Fix a possible out-of-bounds read in snapshot.cpp --- src/engine/shared/snapshot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/shared/snapshot.cpp b/src/engine/shared/snapshot.cpp index ef31dea6d..ea39b3130 100644 --- a/src/engine/shared/snapshot.cpp +++ b/src/engine/shared/snapshot.cpp @@ -359,7 +359,7 @@ int CSnapshotDelta::UnpackDelta(CSnapshot *pFrom, CSnapshot *pTo, void *pSrcData Type = *pData++; ID = *pData++; - if ((unsigned int)Type < sizeof(m_aItemSizes) && m_aItemSizes[Type]) + if ((unsigned int)Type < sizeof(m_aItemSizes) / sizeof(m_aItemSizes[0]) && m_aItemSizes[Type]) ItemSize = m_aItemSizes[Type]; else {