Fixed initialization bug in native filters

Fixed bug where address boundaries were not checked on arrays
This commit is contained in:
David Anderson 2005-09-11 05:43:17 +00:00
parent 73d70aff29
commit e3afe22a48
2 changed files with 4 additions and 1 deletions

View File

@ -548,6 +548,9 @@ int Debugger::FormatError(char *buffer, size_t maxLength)
} else if (v_class == 0) {
p_addr = (cell *)(data + pSymbol->address);
}
//make sure our address is in bounds!
if (arr_addr < p_addr || arr_addr > (p_addr + size))
continue;
int *sizes = new int[pSymbol->dim];
int *indexes = new int[pSymbol->dim];
for (int i=0; i<pSymbol->dim; i++)

View File

@ -150,7 +150,7 @@ class Handler
public:
Handler(AMX *pAmx) : m_pAmx(pAmx),
m_iErrFunc(-1), m_iModFunc(-1), m_iNatFunc(-1),
m_Handling(false)
m_Handling(false), m_InNativeFilter(false)
{ };
~Handler() { };
public: