提交 98a5ad09 编写于 作者: dengyihao's avatar dengyihao

[TD-5466]<fix> handle invalid Escapes

上级 0594c5c6
......@@ -254,8 +254,12 @@ int32_t shellRunCommand(TAOS* con, char* command) {
}
if (c == '\\') {
esc = true;
continue;
if (quote != 0 && (*command == '_' || *command == '\\')) {
//DO nothing
} else {
esc = true;
continue;
}
}
if (quote == c) {
......
......@@ -262,6 +262,7 @@ int patternMatch(const char *patterStr, const char *str, size_t size, const SPat
c1 = str[j++];
if (j <= size) {
if (c == '\\' && patterStr[i] == '_' && c1 == '_') { i++; continue; }
if (c == c1 || tolower(c) == tolower(c1) || (c == pInfo->matchOne && c1 != 0)) {
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册