提交 27952bb2 编写于 作者: X xywang

[TD-13616]<fix>: fixed wrong length parsing in special chars escaping

上级 355b00fe
...@@ -2140,7 +2140,7 @@ static int32_t parseSmlKey(TAOS_SML_KV *pKV, const char **index, SHashObj *pHash ...@@ -2140,7 +2140,7 @@ static int32_t parseSmlKey(TAOS_SML_KV *pKV, const char **index, SHashObj *pHash
static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **index, static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **index,
bool *is_last_kv, SSmlLinesInfo* info, bool isTag) { bool *is_last_kv, SSmlLinesInfo* info, bool isTag) {
const char *start, *cur; const char *start, *cur, *tmp;
int32_t ret = TSDB_CODE_SUCCESS; int32_t ret = TSDB_CODE_SUCCESS;
char *value = NULL; char *value = NULL;
int16_t len = 0; int16_t len = 0;
...@@ -2188,8 +2188,11 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **index, ...@@ -2188,8 +2188,11 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **index,
} }
//Escape special character //Escape special character
if (*cur == '\\') { if (*cur == '\\') {
tmp = cur;
escapeSpecialCharacter(isTag ? 2 : 3, &cur); escapeSpecialCharacter(isTag ? 2 : 3, &cur);
len++; if (tmp != cur) {
continue;
}
} }
cur++; cur++;
len++; len++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册