[HUST CSE] for循环判断条件出错字符串读取越界 (#7352)
This commit is contained in:
parent
c2ac614c59
commit
90853abb08
@ -399,7 +399,7 @@ static rt_err_t at_cmd_get_name(const char *cmd_buffer, char *cmd_name)
|
|||||||
RT_ASSERT(cmd_name);
|
RT_ASSERT(cmd_name);
|
||||||
RT_ASSERT(cmd_buffer);
|
RT_ASSERT(cmd_buffer);
|
||||||
|
|
||||||
for (i = 0; i < strlen(cmd_buffer) + 1; i++)
|
for (i = 0; i < strlen(cmd_buffer); i++)
|
||||||
{
|
{
|
||||||
if (*(cmd_buffer + i) == AT_CMD_QUESTION_MARK || *(cmd_buffer + i) == AT_CMD_EQUAL_MARK
|
if (*(cmd_buffer + i) == AT_CMD_QUESTION_MARK || *(cmd_buffer + i) == AT_CMD_EQUAL_MARK
|
||||||
|| *(cmd_buffer + i) == AT_CMD_CR
|
|| *(cmd_buffer + i) == AT_CMD_CR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user