clickhouse-client: fix NULL dereference for --param w/o value

This commit is contained in:
Azat Khuzhin 2021-06-22 09:38:01 +03:00
parent 99f60a7c1d
commit 7739fcc295

View File

@ -2446,6 +2446,8 @@ public:
{
/// param_name value
++arg_num;
if (arg_num >= argc)
throw Exception("Parameter requires value", ErrorCodes::BAD_ARGUMENTS);
arg = argv[arg_num];
query_parameters.emplace(String(param_continuation), String(arg));
}