Skip to content

Commit

Permalink
fix: memory over write
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Apr 7, 2024
1 parent 1569919 commit 460759a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/benchInsert.c
Original file line number Diff line number Diff line change
Expand Up @@ -2913,7 +2913,7 @@ static int64_t fillChildTblNameByLimitOffset(SDataBase *database,
int *lengths = taos_fetch_lengths(res);
char * childName = benchCalloc(1, lengths[0] + 1, true);
strncpy(childName, row[0], lengths[0]);
childName[lengths[0] + 1] = '\0';
childName[lengths[0]] = '\0';
stbInfo->childTblArray[count]->name = childName;
debugPrint("stbInfo->childTblArray[%" PRId64 "]->name: %s\n",
count, stbInfo->childTblArray[count]->name);
Expand Down

0 comments on commit 460759a

Please sign in to comment.