mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fixed potential issue in Obfuscator on illegal UTF-8 source #2518
This commit is contained in:
parent
33205bba92
commit
394b020869
@ -503,8 +503,11 @@ private:
|
||||
CodePoint readCodePoint(const char *& pos, const char * end)
|
||||
{
|
||||
size_t length = UTF8::seqLength(*pos);
|
||||
|
||||
if (pos + length > end)
|
||||
length = end - pos;
|
||||
if (length > sizeof(CodePoint))
|
||||
length = sizeof(CodePoint);
|
||||
|
||||
CodePoint res = 0;
|
||||
memcpy(&res, pos, length);
|
||||
|
Loading…
Reference in New Issue
Block a user