fix: scanf set length from 128 to 255
This commit is contained in:
parent
4daa71b6be
commit
6c25d88f14
|
@ -226,13 +226,13 @@ class TDTestCase(TBase):
|
|||
tdSql.execute(sql)
|
||||
|
||||
cmds = [
|
||||
f"-udkj -p{pwd} -s show databases;", # command pass
|
||||
f"-udkj -p < {pwdFile} -s show databases;" # input pass
|
||||
f"-udkj -p{pwd} -s 'show databases;'", # command pass
|
||||
f"-udkj -p < {pwdFile} -s 'show databases;'" # input pass
|
||||
]
|
||||
|
||||
for cmd in cmds:
|
||||
rlist = self.taos(cmd)
|
||||
self.checkListString("Query OK,")
|
||||
self.checkListString(rlist, "Query OK,")
|
||||
|
||||
# run
|
||||
def run(self):
|
||||
|
|
|
@ -337,7 +337,7 @@ static void shellInitArgs(int argc, char *argv[]) {
|
|||
if (strlen(argv[i]) == 2) {
|
||||
printf("Enter password: ");
|
||||
taosSetConsoleEcho(false);
|
||||
if (scanf("%128s", shell.args.password) > 1) {
|
||||
if (scanf("%255s", shell.args.password) > 1) {
|
||||
fprintf(stderr, "password reading error\n");
|
||||
}
|
||||
taosSetConsoleEcho(true);
|
||||
|
|
Loading…
Reference in New Issue