From 1e6b1c92cc57dbf916d5396efbf7c30da113f8ab Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 1 Mar 2008 06:07:16 +0000 Subject: [PATCH] fixed amb1485 - memory corruption in ShiftArrayUp() / CellArray::insert_at() --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401909 --- core/CellArray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/CellArray.h b/core/CellArray.h index f8925a60..786cd255 100644 --- a/core/CellArray.h +++ b/core/CellArray.h @@ -118,7 +118,7 @@ public: /* move everything up */ cell_t *src = at(index); cell_t *dst = at(index + 1); - memmove(dst, src, sizeof(cell_t) * m_BlockSize * m_Size); + memmove(dst, src, sizeof(cell_t) * m_BlockSize * (m_Size-index)); m_Size++;