mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Merge pull request #21492 from azat/client-fix-highlight-multiline-comment
Fix heap-buffer-overflow in highlighting multi-line comments
This commit is contained in:
commit
40a99b7431
@ -275,7 +275,8 @@ Token Lexer::nextTokenImpl()
|
||||
else
|
||||
++pos;
|
||||
}
|
||||
return Token(TokenType::ErrorMultilineCommentIsNotClosed, token_begin, end);
|
||||
pos = end;
|
||||
return Token(TokenType::ErrorMultilineCommentIsNotClosed, token_begin, pos);
|
||||
}
|
||||
}
|
||||
return Token(TokenType::Slash, token_begin, pos);
|
||||
|
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
log_user 0
|
||||
set timeout 5
|
||||
match_max 100000
|
||||
# A default timeout action is to do nothing, change it to fail
|
||||
expect_after {
|
||||
timeout {
|
||||
exit 2
|
||||
}
|
||||
}
|
||||
|
||||
set basedir [file dirname $argv0]
|
||||
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT"
|
||||
expect ":) "
|
||||
|
||||
# regression for heap-buffer-overflow issue (under ASAN)
|
||||
send -- "/**"
|
||||
expect "/**"
|
||||
# just in case few more bytes
|
||||
send -- "foobar"
|
||||
expect "/**foobar"
|
||||
|
||||
send -- "\3\4"
|
||||
expect eof
|
@ -212,6 +212,7 @@
|
||||
01017_uniqCombined_memory_usage
|
||||
01747_join_view_filter_dictionary
|
||||
01748_dictionary_table_dot
|
||||
01755_client_highlight_multi_line_comment_regression
|
||||
00950_dict_get
|
||||
01683_flat_dictionary
|
||||
01681_cache_dictionary_simple_key
|
||||
|
@ -95,7 +95,8 @@
|
||||
"01370_client_autocomplete_word_break_characters",
|
||||
"01676_clickhouse_client_autocomplete",
|
||||
"01193_metadata_loading",
|
||||
"01455_time_zones"
|
||||
"01455_time_zones",
|
||||
"01755_client_highlight_multi_line_comment_regression"
|
||||
],
|
||||
"release-build": [
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user