Merge pull request #5353 from JonasWen/dev

[fix]修复AT组件在CLI模式下,指令输入过长导致数组越界的问题
This commit is contained in:
Bernard Xiong 2021-12-10 22:51:38 +08:00 committed by GitHub
commit 42abaf61af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -264,6 +264,10 @@ static void client_cli_parser(at_client_t client)
}
else
{
if(cur_line_len >= FINSH_CMD_SIZE)
{
continue;
}
rt_kprintf("%c", ch);
cur_line[cur_line_len++] = ch;
}