diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 7d7d7b8eb8b87f5f989b938cd263c366f5e3e916..c2f0af962c65b3be0841dd0aa47d575c8263e56a 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1460,7 +1460,7 @@ static int32_t parseSmlTimeStamp(TAOS_SML_KV **pTS, const char **index) { } if (len > 0) { - value = calloc(len, 1); + value = calloc(len+1, 1); memcpy(value, start, len); } @@ -1786,7 +1786,7 @@ int32_t tscParseLines(char* lines[], int numLines, SArray* points, SArray* faile TAOS_SML_DATA_POINT point = {0}; int32_t code = tscParseLine(lines[i], &point); if (code != TSDB_CODE_SUCCESS) { - tscError("data point line parse failed. line %d", i); + tscError("data point line parse failed. line %d : %s", i, lines[i]); return TSDB_CODE_TSC_LINE_SYNTAX_ERROR; } else { tscDebug("data point line parse success. line %d", i);