fix incorrect usage of memcpySmall [#CLICKHOUSE-2808]

This commit is contained in:
Alexey Zatelepin 2017-02-03 17:28:53 +03:00 committed by alexey-milovidov
parent ccb827077b
commit 3479a5dddf

View File

@ -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;
}