mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Fix error
This commit is contained in:
parent
e865b49293
commit
0e07fe1002
@ -553,13 +553,16 @@ private:
|
||||
|
||||
if constexpr (mode == CipherMode::RFC5116_AEAD_AES_GCM)
|
||||
{
|
||||
if (string_size > 0 && string_size < tag_size)
|
||||
if (string_size > 0)
|
||||
{
|
||||
if (string_size < tag_size)
|
||||
throw Exception("Encrypted data is smaller than the size of additional data for AEAD mode, cannot decrypt.",
|
||||
ErrorCodes::BAD_ARGUMENTS);
|
||||
|
||||
resulting_size -= tag_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decrypted_result_column_data.resize(resulting_size);
|
||||
}
|
||||
@ -592,6 +595,7 @@ private:
|
||||
throw Exception(fmt::format("Encrypted data is too short: only {} bytes, "
|
||||
"should contain at least {} bytes of a tag.",
|
||||
input_value.size, block_size, tag_size), ErrorCodes::BAD_ARGUMENTS);
|
||||
|
||||
input_value.size -= tag_size;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user