mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Backport #64024 to 24.3: Deserialize untrusted binary inputs in a safer way
This commit is contained in:
parent
8506b1fd63
commit
d6edd8f64d
@ -20,6 +20,7 @@ namespace ErrorCodes
|
||||
{
|
||||
extern const int CANNOT_RESTORE_FROM_FIELD_DUMP;
|
||||
extern const int DECIMAL_OVERFLOW;
|
||||
extern const int INCORRECT_DATA;
|
||||
}
|
||||
|
||||
inline Field getBinaryValue(UInt8 type, ReadBuffer & buf)
|
||||
@ -140,7 +141,7 @@ inline Field getBinaryValue(UInt8 type, ReadBuffer & buf)
|
||||
case Field::Types::CustomType:
|
||||
return Field();
|
||||
}
|
||||
UNREACHABLE();
|
||||
throw Exception(ErrorCodes::INCORRECT_DATA, "Unknown field type {}", std::to_string(type));
|
||||
}
|
||||
|
||||
void readBinary(Array & x, ReadBuffer & buf)
|
||||
|
Loading…
Reference in New Issue
Block a user