aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2022-09-17 12:02:18 +0300
committeruzhas <uzhas@ydb.tech>2022-09-17 12:02:18 +0300
commite4065899cddff8a7bde3bc774f33e9b6bebd961c (patch)
tree2aedc032fa03cd1bfb354a91ebdc48b43b8b9073
parentf7ac351009be051be95861cb7735fd76f368089c (diff)
downloadydb-e4065899cddff8a7bde3bc774f33e9b6bebd961c.tar.gz
do not crash on broken CSV in checkTypeValidness
-rw-r--r--ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp b/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp
index 002b1f8688..125a094f42 100644
--- a/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp
+++ b/ydb/library/yql/udfs/common/clickhouse/client/src/Processors/Formats/Impl/CSVRowInputFormat.cpp
@@ -142,6 +142,9 @@ static bool checkTypeValidness(ReadBuffer& in, const char delimiter, bool is_las
}
}
else {
+ if (in.eof())
+ return false;
+
if (*in.position() == delimiter) {
return true;
}