mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix use of unitialized memory
This commit is contained in:
parent
415aabd4d0
commit
46f4f8a457
@ -87,7 +87,7 @@ namespace detail
|
||||
|
||||
if (null_map && (*null_map)[i])
|
||||
{
|
||||
vec_res[i] = 0;
|
||||
std::fill_n(&vec_res[i], IPV6_BINARY_LENGTH, 0);
|
||||
src_offset = src_next_offset;
|
||||
if constexpr (exception_mode == IPStringToNumExceptionMode::Null)
|
||||
(*vec_null_map_to)[i] = true;
|
||||
|
@ -17,8 +17,16 @@ true
|
||||
\N
|
||||
0.0.0.0
|
||||
\N
|
||||
0.0.0.0
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
0
|
||||
\N
|
||||
::
|
||||
\N
|
||||
::
|
||||
\N
|
||||
\N
|
||||
\N
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
|
||||
|
@ -14,7 +14,10 @@ select CAST(number % 2 ? '0000:0000:0000:0000:0000:0000:0000:0000' : NULL, 'Null
|
||||
|
||||
select toBool(number % 2 ? 'true' : NULL) from numbers(2);
|
||||
select toIPv4(number % 2 ? '0.0.0.0' : NULL) from numbers(2);
|
||||
select toIPv4OrDefault(number % 2 ? '' : NULL) from numbers(2);
|
||||
select toIPv4OrNull(number % 2 ? '' : NULL) from numbers(2);
|
||||
select IPv4StringToNum(number % 2 ? '0.0.0.0' : NULL) from numbers(2);
|
||||
select toIPv6(number % 2 ? '0000:0000:0000:0000:0000:0000:0000:0000' : NULL) from numbers(2);
|
||||
select toIPv6OrDefault(number % 2 ? '' : NULL) from numbers(2);
|
||||
select toIPv6OrNull(number % 2 ? '' : NULL) from numbers(2);
|
||||
select IPv6StringToNum(number % 2 ? '0000:0000:0000:0000:0000:0000:0000:0000' : NULL) from numbers(2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user