From dc8f201d4c52ba0ca5ba3b288cf0ba6912789367 Mon Sep 17 00:00:00 2001 From: achulkov2 Date: Wed, 25 Dec 2019 18:27:04 +0300 Subject: [PATCH] Fix default string use after free --- dbms/src/Dictionaries/PolygonDictionary.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbms/src/Dictionaries/PolygonDictionary.cpp b/dbms/src/Dictionaries/PolygonDictionary.cpp index c4bc3a29231..94685026589 100644 --- a/dbms/src/Dictionaries/PolygonDictionary.cpp +++ b/dbms/src/Dictionaries/PolygonDictionary.cpp @@ -230,12 +230,12 @@ void IPolygonDictionary::getString( const auto ind = getAttributeIndex(attribute_name); checkAttributeType(name, attribute_name, dict_struct.attributes[ind].underlying_type, AttributeUnderlyingType::utString); - const auto & null_value = StringRef{getNullValue(dict_struct.attributes[ind].null_value)}; + const auto & null_value = getNullValue(dict_struct.attributes[ind].null_value); - getItemsImpl( + getItemsImpl( ind, key_columns, - [&](const size_t, const StringRef value) { out->insertData(value.data, value.size); }, + [&](const size_t, const String value) { out->insertData(value.data(), value.size()); }, [&](const size_t) { return null_value; }); }