未验证 提交 78c24ae1 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Hotfix/sangshuduo/td 3914 taosdemo func param segfault for develop (#6110)

* [TD-3914]<fix>: taosdemo check func param input more.

for develop branch.

* [TD-3914]<fix>: taosdemo check func param more.

for develop branch.

* [TD-3914]<fix>: taosdemo input argument validation. (#6097)
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 8f8cf26c
......@@ -725,7 +725,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
exit(EXIT_FAILURE);
}
tstrncpy(configDir, argv[++i], TSDB_FILENAME_LEN);
} else if (strcmp(argv[i], "-h") == 0) {
if (argc == i+1) {
printHelp();
......@@ -849,6 +848,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
}
arguments->num_of_CPR = atoi(argv[++i]);
} else if (strcmp(argv[i], "-b") == 0) {
if (argc == i+1) {
printHelp();
errorPrint("%s", "\n\t-b need valid string following!\n");
exit(EXIT_FAILURE);
}
sptr = arguments->datatype;
++i;
if (strstr(argv[i], ",") == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册