mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Merge pull request #22655 from azat/system.errors-invalid-read
Fix impossible invalid-read for system.errors accounting
This commit is contained in:
commit
3708821689
@ -590,7 +590,7 @@ namespace ErrorCodes
|
||||
|
||||
void increment(ErrorCode error_code, bool remote, const std::string & message, const FramePointers & trace)
|
||||
{
|
||||
if (error_code >= end())
|
||||
if (error_code < 0 || error_code >= end())
|
||||
{
|
||||
/// For everything outside the range, use END.
|
||||
/// (end() is the pointer pass the end, while END is the last value that has an element in values array).
|
||||
|
Loading…
Reference in New Issue
Block a user