Fix integer overflow leading to bad memory access in regex execution

Fixes #2481
Fixes #2480
This commit is contained in:
Maxime Coste 2018-10-08 12:43:03 +11:00
parent ed84a2d60c
commit 9024d41d64

View File

@ -620,9 +620,9 @@ private:
} }
std::unique_ptr<Thread[]> m_data = nullptr; std::unique_ptr<Thread[]> m_data = nullptr;
int16_t m_capacity = 0; int32_t m_capacity = 0; // Maximum capacity should be 2*instruction count, so 65536
int16_t m_current = 0; int32_t m_current = 0;
int16_t m_next = 0; int32_t m_next = 0;
}; };
DualThreadStack m_threads; DualThreadStack m_threads;