mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
fix incorrect usage of memcpySmall [#CLICKHOUSE-2808]
This commit is contained in:
parent
ccb827077b
commit
3479a5dddf
@ -158,8 +158,7 @@ public:
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
ToFieldType value = 0;
|
||||
memcpySmallAllowReadWriteOverflow15(
|
||||
&value, &data_from[offset], std::min(sizeof(ToFieldType), offsets_from[i] - offset - 1));
|
||||
memcpy(&value, &data_from[offset], std::min(sizeof(ToFieldType), offsets_from[i] - offset - 1));
|
||||
vec_res[i] = value;
|
||||
offset = offsets_from[i];
|
||||
}
|
||||
@ -180,7 +179,7 @@ public:
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
ToFieldType value = 0;
|
||||
memcpySmallAllowReadWriteOverflow15(&value, &data_from[offset], copy_size);
|
||||
memcpy(&value, &data_from[offset], copy_size);
|
||||
vec_res[i] = value;
|
||||
offset += step;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user