Merge pull request #26430 from taosdata/fix/fixCompileError

fix compile error
This commit is contained in:
Hongze Cheng 2024-07-05 14:03:10 +08:00 committed by GitHub
commit 80d388fa25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -4226,7 +4226,7 @@ int32_t dbChkpDumpTo(SDbChkp* p, char* dname, SArray* list) {
static char* chkpMeta = "META";
memset(dstBuf, 0, len);
sprintf(dstBuf, "%s%s%s", dstDir, TD_DIRSEP, chkpMeta);
tstrncpy(dstDir, dstBuf, strlen(dstBuf) + 1);
memcpy(dstDir, dstBuf, strlen(dstBuf));
TdFilePtr pFile = taosOpenFile(dstDir, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC);
if (pFile == NULL) {