fix: strncpy replace with memcpy on 3.0

This commit is contained in:
Alex Duan 2023-12-05 10:51:19 +08:00
parent 4e68fbd744
commit dd53d57021
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,7 @@ int taos_options_imp(TSDB_OPTION option, const char *str) {
return -1;
}
newstr[0] = '"';
strncpy(newstr+1, str, len);
memcpy(newstr+1, str, len);
newstr[len + 1] = '"';
newstr[len + 2] = '\0';
str = newstr;