From 38fb271c8360138f772147132ba6b7e27c873cd8 Mon Sep 17 00:00:00 2001 From: Vincent HERBET Date: Sat, 22 Jun 2013 12:34:38 +0200 Subject: [PATCH] Fix an overflow issue with ArrayInsert[Before|After] (bug 4330, r=joropito) Former-commit-id: ba56af8a7132de17e42412bd33c1958353711e60 --- amxmodx/datastructs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amxmodx/datastructs.h b/amxmodx/datastructs.h index 3f397f61..2609d12c 100644 --- a/amxmodx/datastructs.h +++ b/amxmodx/datastructs.h @@ -232,7 +232,7 @@ public: } // Allocate a temporary buffer to store data in - size_t tempbuffsize=(sizeof(cell) * cellcount) * (this->count - which); + size_t tempbuffsize=(sizeof(cell) * cellcount) * (this->count - 1 - which); cell* temp=(cell*)malloc(tempbuffsize);