From a84c731b7a1315fe3c737789c8a6c50b19bee978 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Thu, 22 Jul 2021 11:33:55 +0800 Subject: [PATCH] [TD-5449]: fix invalid stable name core dump and sigabort total tag num exceed maximum --- src/client/src/tscParseLineProtocol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index d83f3a9c1c..ce76f5d82c 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -494,6 +494,7 @@ static int32_t reconcileDBSchemas(TAOS* taos, SArray* stableSchemas) { code = loadTableMeta(taos, pointSchema->sTableName, &dbSchema); if (code != 0) { tscError("reconcile point schema failed. can not create %s", pointSchema->sTableName); + return code; } else { pointSchema->precision = dbSchema.precision; destroySmlSTableSchema(&dbSchema); @@ -1565,6 +1566,7 @@ static int32_t parseSmlMeasurement(TAOS_SML_DATA_POINT *pSml, const char **index if (isdigit(*cur)) { tscError("Measurement field cannnot start with digit"); free(pSml->stableName); + pSml->stableName = NULL; return TSDB_CODE_TSC_LINE_SYNTAX_ERROR; } @@ -1572,6 +1574,7 @@ static int32_t parseSmlMeasurement(TAOS_SML_DATA_POINT *pSml, const char **index if (len > TSDB_TABLE_NAME_LEN) { tscError("Measurement field cannot exceeds 193 characters"); free(pSml->stableName); + pSml->stableName = NULL; return TSDB_CODE_TSC_LINE_SYNTAX_ERROR; } //first unescaped comma or space identifies measurement -- GitLab